使用蒙特卡洛模拟+布朗桥的期权定价

问题描述 投票:0回答:1

我正在尝试估算Matlab中欧洲看涨期权的价格。用Black-Scholes计算的精确值为6.89。我正在将Monte Carlo Simulation与Brownian Bridge配合使用,以加快收敛速度​​。不幸的是,用我的代码估算的价格是很高的(始终在120附近),我的代码没有问题。请在下面找到代码。如果有人可以帮助我解决我的问题,我将非常感激!

最佳亚尼斯

P.S .:输入参数“ Pfade”是指模拟的布朗桥路径的数量。如果您需要更多信息,请告诉我,我对MC-Simulation和Matlab还是陌生的!

function P=eurocallprice_QMC_BBD(S0,K,r,T,sigma,n,Pfade)
dt=T/n;
timestep=[0:dt:T]';
Wt=zeros(n+1,Pfade);
%Simulate the Brownian motion at T:
eY = randn(1,Pfade);
Wt(n+1,:)= sqrt(T).*eY;
%Simulate the Brownian motion W(t):
for j=2:n
  deltat1=(n+1-j)/(n+1-j+1);
  eYt = randn(1,Pfade);
  Wt(j,:)=deltat1*Wt(j-1,:)+(1-deltat1)*Wt(n+1,:)+sqrt(deltat1*dt)*eYt;
end
BB=Wt;
plot(BB)
SPaths = zeros(n+1, Pfade);
SPaths(1, :) = S0;
for i = 1:n+1
  SPaths(i + 1, :) = SPaths(i,:) .* (1 + r * dt + sigma * BB(i,:));
end
Payoff = zeros(Pfade,1);
Payoff = max(0, SPaths(n+1,:) - K);
P = exp(-r*T) * mean(Payoff);
end
matlab options montecarlo
1个回答
0
投票

通过使用链接的维基百科页面上的公式:

% Dummy parameter
S0 = 100
K = 100
sigma = 0.2
T = 0.5
r = 0.05

% Application of the formula
N  = @(x) 0.5*(erf(x/sqrt(2))+1)                        %The normal cumulative distribution (with a mean = 0)
d1 = (1/(sigma*T^0.5))*(log(S0/K)+(r+(sigma^2/2))*T)   
d2 = d1-sigma*T^0.5
PV = K*exp(-r*T)
C  = N(d1)*S0 - N(d2)*PV                                %Call price
P  = PV*(1-N(d2))-S0*(1-N(d1))                          %Put  price

我们得到

C = 6.89

顺便说一句,由于我们使用布朗路径来了解股票的运作方式,我有点担心。

enter image description here

© www.soinside.com 2019 - 2024. All rights reserved.