|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?我要加入
x
Constant N=893617900, M1=313148160, M2=297872640, X1=7.96, X2=6.93,tuo=2,S=11.430,sigmas=0.4938,r=0.0252; Function sigmas-(V*sigmav/S)* (1/N-(M1/N)* ( normcdf(((log(V/(N*X1+M2*(X1-X2)))+(r+1/2*sigmav*sigmav)*tuo)/(sigmav*sqrt(tuo)))) /(N+M1+M2) +M2* normcdf(((log(V/(N*X2-M1*(X1-X2)))+(r+1/2*sigmav*sigmav)*tuo)/(sigmav*sqrt(tuo)))) / ((N+M1)*(N+M1+M2)) ) -(M2/N)*( normcdf(((log(V/(N*X2-M1*(X1-X2)))+(r+1/2*sigmav*sigmav)*tuo)/(sigmav*sqrt(tuo))))/(N+M1+M2) + M1*normcdf(((log(V/(N*X1+M2*(X1-X2)))+(r+1/2*sigmav*sigmav)*tuo)/(sigmav*sqrt(tuo))))/ ((N+M2)*(N+M1+M2)) ) ) ; S*N-V+ M1*( (1/(N+M1+M2)) * (V* normcdf(((log(V/(N*X1+M2*(X1-X2)))+(r+1/2*sigmav*sigmav)*tuo)/(sigmav*sqrt(tuo)))) -exp(-r*tuo)* (N*X1+M2*(X1-X2)) * normcdf(((log(V/(N*X1+M2*(X1-X2)))+(r+1/2*sigmav*sigmav)*tuo)/(sigmav*sqrt(tuo)))-sigmav*sqrt(tuo)) ) + (M2/((N+M2)*(N+M1+M2))) * (V* normcdf(((log(V/(N*X2-M1*(X1-X2)))+(r+1/2*sigmav*sigmav)*tuo)/(sigmav*sqrt(tuo)))) -exp(-r*tuo)* (N*X1+M2*(X1-X2)) * normcdf(((log(V/(N*X2-M1*(X1-X2)))+(r+1/2*sigmav*sigmav)*tuo)/(sigmav*sqrt(tuo)))-sigmav*sqrt(tuo)) ) ) + M2* ( (1/(N+M1+M2))* (V* normcdf(((log(V/(N*X2-M1*(X1-X2)))+(r+1/2*sigmav*sigmav)*tuo)/(sigmav*sqrt(tuo)))) -exp(-r*tuo)* (N*X1+M2*(X1-X2)) * normcdf(((log(V/(N*X2-M1*(X1-X2)))+(r+1/2*sigmav*sigmav)*tuo)/(sigmav*sqrt(tuo)))-sigmav*sqrt(tuo)) ) + (M1/((N+M2)*(N+M1+M2))) * (V* normcdf(((log(V/(N*X1+M2*(X1-X2)))+(r+1/2*sigmav*sigmav)*tuo)/(sigmav*sqrt(tuo)))) -exp(-r*tuo)* (N*X1+M2*(X1-X2)) * normcdf(((log(V/(N*X1+M2*(X1-X2)))+(r+1/2*sigmav*sigmav)*tuo)/(sigmav*sqrt(tuo)))-sigmav*sqrt(tuo)) ) ) ; W1= ( (1/(N+M1+M2)) * (V* normcdf(((log(V/(N*X1+M2*(X1-X2)))+(r+1/2*sigmav*sigmav)*tuo)/(sigmav*sqrt(tuo)))) -exp(-r*tuo)* (N*X1+M2*(X1-X2)) * normcdf(((log(V/(N*X1+M2*(X1-X2)))+(r+1/2*sigmav*sigmav)*tuo)/(sigmav*sqrt(tuo)))-sigmav*sqrt(tuo)) ) + (M2/((N+M2)*(N+M1+M2))) * (V* normcdf(((log(V/(N*X2-M1*(X1-X2)))+(r+1/2*sigmav*sigmav)*tuo)/(sigmav*sqrt(tuo)))) -exp(-r*tuo)* (N*X1+M2*(X1-X2)) * normcdf(((log(V/(N*X2-M1*(X1-X2)))+(r+1/2*sigmav*sigmav)*tuo)/(sigmav*sqrt(tuo)))-sigmav*sqrt(tuo)) ) ) ; W2= ( (1/(N+M1+M2))* (V* normcdf(((log(V/(N*X2-M1*(X1-X2)))+(r+1/2*sigmav*sigmav)*tuo)/(sigmav*sqrt(tuo)))) -exp(-r*tuo)* (N*X1+M2*(X1-X2)) * normcdf(((log(V/(N*X2-M1*(X1-X2)))+(r+1/2*sigmav*sigmav)*tuo)/(sigmav*sqrt(tuo)))-sigmav*sqrt(tuo)) ) + (M1/((N+M2)*(N+M1+M2))) * (V* normcdf(((log(V/(N*X1+M2*(X1-X2)))+(r+1/2*sigmav*sigmav)*tuo)/(sigmav*sqrt(tuo)))) -exp(-r*tuo)* (N*X1+M2*(X1-X2)) * normcdf(((log(V/(N*X1+M2*(X1-X2)))+(r+1/2*sigmav*sigmav)*tuo)/(sigmav*sqrt(tuo)))-sigmav*sqrt(tuo)) ) )
本来结果W1=1.** 竟然变成?奇怪 难道? |
|