- 在线时间
- 6 小时
- 最后登录
- 2014-9-22
- 注册时间
- 2014-3-5
- 听众数
- 7
- 收听数
- 0
- 能力
- 0 分
- 体力
- 51 点
- 威望
- 0 点
- 阅读权限
- 20
- 积分
- 24
- 相册
- 0
- 日志
- 0
- 记录
- 4
- 帖子
- 16
- 主题
- 5
- 精华
- 0
- 分享
- 0
- 好友
- 1
升级   20% TA的每日心情 | 难过 2014-9-22 12:14 |
|---|
签到天数: 6 天 [LV.2]偶尔看看I
- 自我介绍
- 数学专业
 |
疑问:; `, a" l1 e7 k# j' k
为什么在运行下边程序时,总是提示“??? Undefined function or method 'asamin' for input arguments of type 'char'.”- d* o, ], ~9 c" i+ M& w
Error in ==> HestonASACalibration at 14
+ _0 m+ W% a# V9 y asamin('set','test_in_cost_func',0)
2 Z' v) c2 `2 N$ O) n" ~. o- A; b, E我在网上查了下,这是在运ASA时,没定义函数的类型……总之,不是很理解,更不知该怎么改正??? Y$ p% q% o8 T" s$ R, z
u! n, `2 E4 d" ` i+ a 完整程序* U( O! c( J [6 M: [* I
clear;
; }4 L6 e2 T# m' Y% b global OptionData;0 t; ^( ^( i. ?) F- }
global NoOfOptions;
$ D6 H6 a, e' P, Y6 A1 ?2 ` global NoOfIterations;: q: ^9 b; a/ @9 y! y( h
global PriceDifference;
/ A* B' I: D# P5 U9 J9 \ global ObjectiveFunc;6 j& T4 g7 u+ f* k5 z- _3 y
NoOfIterations = 0;
3 [5 b, z" h, ~0 S8 a %OptionData = [r,T,S0,K,Option Value,bid,offer]2 }, C: z# E: @/ D' M( I, Z- A
Size = size(OptionData);
2 c- `( ~) X. l, j. s* D NoOfOptions = Size(1);
5 ^* \/ I% V7 L %input sequence in initial vectors [kappa,theta,sigma,rho,v0]1 @8 _- y, r4 X# F1 D) o
x0 = [0.030854841 0.999999922 0.248415019 -1 0.08977599];& ?8 i4 p; p* m. R7 w
lb = [0 0 0 -1 0];ub = [10 1 5 0 1];
& l |! l( i f b( S j asamin('set','test_in_cost_func',0)
. V4 h, x" w5 j4 r tic;
2 E$ h" p0 f, |- u# R8 `1 W [fstar, xstar, grad, hessian, state] = asamin('minimize',...
2 Y5 e* u. z6 Z. B- I 'HestonCostFunc',x0',lb',ub',-1*ones(5,1));
5 K0 z; q% ?/ ] y toc; %秒表计时器 ]- L" T1 [$ h f
出错程序, a8 Z! t4 K: ]* ?6 s: K5 t
asamin('set','test_in_cost_func',0)7 `5 u; V* W" [! Q
运行提示错误为:7 l6 o% c- r* I* h8 ~! s, a
??? Undefined function or method 'asamin' for input arguments of type 'char'. |
zan
|