Optimization terminated: first-order optimality is less than options.TolFun.
Va =
1.3647e+009
AssetTheta =
0.2184
编程如下(别人论文里找的也不知道对不对,感兴趣的可以先运行一下)Matlab程序:
function[Va,SigmaVa]=Conv(E,SigmaE,D,r,T)
%计算Va,SigmaVa
key=0
Pl=4*atan(l)
newVa=Va
SigmaVa=SigmaE%SigmaVa以SigmaE为迭代的初值
For k=1:100000%迭代SigmaVa
For j=1:100000%迭代Va
oldVa=newVa
%Va=(E+D*exp(-r*T)*Nd2)/Ndl
%SigmaVa=E*SigmaE/(E+D*exp(-r*T)*Nd2)
dl=(log(oldVa/D)+(r+(SigmaVa^2)/2)*T)/(SigmaVa*(T^0.5))
d2=dl-(SigmaVa*(T^(1/2)))
Ndl=normedf(dl,0,1)
Nd2=normedf(d2,0,1)
fV=oldVa*Ndl-D*exp(-r*T)*Nd2-E
dfV=Ndl+exp(-dl*dl/2)/((2*PI*T)^0.5*SigmaVa)-D*exp(-r*T)*exp(-d2*d2/2)/((2*Pl*T)^0.5*oldVa*SigmaVa)
if dfV==0
dfV
Pause
end
dV=-fV/dfV
newVa=oldVa+dV%前后两次的值认为非常接近,则迭代成功
%newVa
If newVa==0
oldVa
newVa
Pause
end
if(dV/newVa)<le-7&(dV/newVa)>-le-7
break
end
end
Va=newVa
dl=(log(Va/D)+(r+(SigmaVa^2)/2)*T)/(SigmaVa*(T^(1/2)))
d2=dl-(SigmaVa*(T^(l/2)))
Ndl=normedf(dl,0,1)
Nd2=normedf(d2,0,l)%方程右边与左边的比值
diff=(Va*Ndl-D*exp(-r*T)*Nd2)/E
if diff<1-le-5|diff>1+le-5
assert('error')%迭代出现错误
else
key=key+1
end
newSigmaVa=E*SigmaE/(E+D*exp(-r*T)*Nd2)
if((SigmaVa-newSigmaVa)/newSigmaVa)<le-5&(SigmaVa-newSigmaVa)/newSigmaVa)>-le-5
break
key=key+1
else
SigmaVa=newSigmaVa
end
end
if key==2
%e1se
%Va=-1
%SigmaVa=-1
End
如果觉得不麻烦的猜枣卜话,就请留下邮箱吧
我把 股票波动率σ 股权价值 违约点D 无风穗穗险利率 r 时间t 的数据发给你,
求出的结岩扰果应该是企业资本市场价值(V)和行业风险(σ )
万分感谢
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)