疑问: : A" s$ w( `4 ]- ]. n 为什么在运行下边程序时,总是提示“??? Undefined function or method 'asamin' for input arguments of type 'char'.”. X3 F1 Q. Y& |( a& N2 S
Error in ==> HestonASACalibration at 14 7 W4 B* p! |% i asamin('set','test_in_cost_func',0)* Q% O7 m8 W. l9 L
我在网上查了下,这是在运ASA时,没定义函数的类型……总之,不是很理解,更不知该怎么改正???$ o, I, u1 W. C/ U. o# o
I X/ y3 v2 G. H5 X5 w ]% [ j! j 完整程序 3 O/ B W1 d% p& Tclear; : I5 o3 L8 R3 O h3 u global OptionData;1 v8 C z% [! @- s$ \) p
global NoOfOptions; * S2 Q' k; ?: T& H; l1 ]& @: _ global NoOfIterations; 5 K. d0 B2 v. W global PriceDifference; * b- b: y" x8 @0 H" n global ObjectiveFunc;( e, @' T5 _5 a- P* @# Y
NoOfIterations = 0;1 \/ Q$ W) n7 q( X6 K
%OptionData = [r,T,S0,K,Option Value,bid,offer] ' W) w/ X9 l, n# e- m Size = size(OptionData); $ I( d. R' P! Q- }( a( D9 R3 ] NoOfOptions = Size(1);! _' @, C$ D9 D
%input sequence in initial vectors [kappa,theta,sigma,rho,v0]0 `$ ~7 f) }8 x, t
x0 = [0.030854841 0.999999922 0.248415019 -1 0.08977599];& s+ J3 `8 ]# h' A
lb = [0 0 0 -1 0];ub = [10 1 5 0 1]; " b5 n4 x; W+ p) j; P. b6 v- T, o asamin('set','test_in_cost_func',0) * o; C* H5 V8 y x5 y( t tic; , @! d, ^9 q7 ~) t' F [fstar, xstar, grad, hessian, state] = asamin('minimize',... 7 o1 N' G, E' l- f$ c$ D" O 'HestonCostFunc',x0',lb',ub',-1*ones(5,1)); ! F, y$ L/ |4 d4 p toc; %秒表计时器+ R6 n( v5 H) c6 K
出错程序 1 N* u+ n1 u6 t5 I7 i. W; @asamin('set','test_in_cost_func',0) / A" T* [( L% q运行提示错误为: 8 a# [: V. E. B??? Undefined function or method 'asamin' for input arguments of type 'char'.