请dingd看一下
Constant N=100, M=10,k=1,X=100,tao=3,S=120,sigmas=0.75,r=0.0488,eps=0.008,H=0.88,T=3,t=0; Function sigmas-(V*(((N+k*M-M*k*normcdf( (log(k*V/(N*X))+(r+1/2*sigma*sigma)*tao+0.5*sigma*sigma*(T^(2*H)-t^(2*H)))/(sigma*sqrt(tao+T^(2*H)-t^(2*H))) ))/(N*(N+k*M))))/S)*sigma; S*N-V+M*((1/(N+k*M))*(k*V*normcdf( (log(k*V/(N*X))+(r+1/2*sigma*sigma)*tao+0.5*sigma*sigma*(T^(2*H)-t^(2*H)))/(sigma*sqrt(tao+T^(2*H)-t^(2*H))))-exp(-r*tao)*N*X*normcdf( (log(k*V/(N*X))+(r-1/2*sigma*sigma)*tao-0.5*sigma*sigma*(T^(2*H)-t^(2*H)))/(sigma*sqrt(tao+T^(2*H)-t^(2*H))) ) )); W= (V-N*S)/M;为什么在1stopt3.0上运行说程序报错
而在1.5上却可以运行 1:正态累积函数是 normalcdf 而不是 normcdf
2:1stOpt不区分大小写,因此请将T和t用不同字符表示 谢谢dingd拜谢
回复 沙发 dingd 的帖子
dingd 您好,有一组数据我拟合了几个月,始终没有好的效果,您有1stOPt 3.0版本的软件吗?这个版本可以进行3个参数的搜索吗?您能帮我拟合一下吗?十分感谢您!给您添麻烦了。x1 x2 x3 y
270 1.820252518 1.578484269 27.70160442
280 1.837600126 1.595917411 26.21335507
291 1.837600126 1.702125986 24.72910611
300 1.854941604 1.82372253 43.70951827
310 1.872276956 1.993453163 60.91119497
320 1.889606185 2.160874917 55.56405094
330 1.924246288 2.245231522 30.51892857
355 2.010739623 2.286495994 58.99562515
270 3.441350276 1.41081129 47.39258902
280 3.458129791 1.524402253 39.94508957
290.2 3.458129791 1.623797597 37.58912286
300 3.474903475 1.733422428 59.5092606
310 3.491671331 1.842803212 80.99735264
320.2 3.491671331 1.964052179 77.50320626
330 3.508433363 2.074646538 50.34641247
347 3.541939965 2.279621001 252.981967
275 5.204284766 1.16701983 60.69206859
285 5.220457217 1.244321548 45.74988002
295 5.236624149 1.31273796 59.49925971
305 5.252785568 1.395062654 85.19131713
315 5.268941475 1.480744411 94.19793571
325 5.285091873 1.566277394 74.23594085
335 5.301236766 1.649920927 26.95850762
270 5.204284766 1.086074898 59.27294245
275 6.794668655 0.929087022 57.33403541
285 6.810303053 0.980295079 43.57434372
295 6.825932207 1.040264737 56.4430533
305 6.841556119 1.101922381 81.95578617
315 6.857174792 1.16350324 89.42868211
325 6.872788229 1.230275686 65.75875652
335 6.888396432 1.293450623 13.39947712
270 6.794668655 0.89374025 52.01177166
275 9.893674536 0.579818499 56.30695425
285 9.908286636 0.627833349 41.27511893
302 9.966687674 0.688230562 72.20929843
305.5 9.966687674 0.711304217 78.87456055
315 9.99585981 0.750327524 109.0001227
325 10.03958258 0.764510213 55.03813592
页:
[1]