声振论坛

 找回密码
 我要加入

QQ登录

只需一步,快速开始

查看: 3176|回复: 3

[1stopt] IstOpt怎么把数值算大好几倍呢?奇怪

[复制链接]
发表于 2008-6-6 23:35 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?我要加入

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.** 竟然变成?奇怪 难道?
回复
分享到:

使用道具 举报

发表于 2008-6-7 22:31 | 显示全部楼层


不大明白上面是什么意思?能否详细、直观点?
还有代码写的似乎不大好,实际只有两个未知数:v 和 sigmav,而w1和w2都只是v 和 sigmav的函数,没必要将求w1和w2的式子也写在求解方程组里。
发表于 2008-6-7 22:43 | 显示全部楼层
这是代码修改后得到的一组数据:
v: 14267584483.5941
sigmav: 0.601554948841127

传递参数(PassParameter):
w1: 6.57052686360499
W2: 6.70079497410009
 楼主| 发表于 2008-6-20 21:50 | 显示全部楼层
多谢 dingda 我函数表达式中有问题 谢谢
您需要登录后才可以回帖 登录 | 我要加入

本版积分规则

QQ|小黑屋|Archiver|手机版|联系我们|声振论坛

GMT+8, 2024-11-13 10:18 , Processed in 0.059253 second(s), 17 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表