关于解联立非线性方程组的问题,十万火急!高手帮我!
本人最近做论文,需要用两个方程解两个参数。参照高惠璇老师SAS/ETS一书 P310―311中关于解平方根函数和双曲线函数交点的程序编如下程序,但运行不了,还请高手指点迷津,在下先谢过了!
data try ; /*参数估计*/
input e dp f r@@;/*e为权益的市场价值;dp为负债的市场价值,即违约点;f为权益的市场波动率;r为市场(无风险)利率*/
cards;
500021 221345 .23 .0198
202135 2456547 .32 .0198
;
proc model data=try;
eq.f1=a*probnorm((log(a/dp)+(r+fa*fa/2))/f)-dp*exp(-r)*probnorm((log(a/dp)+(r+fa*fa/2))/f-f)-e;
eq.f2=a*probnorm((log(a/dp)+(r+fa*fa/2))/f)/e-f;
solve a fa /solveprint;
id e dp f r;
run; /*公式1为B―S期权定价公式*/
请注意sas的错误提示,是你try中的数据不合适,换一组数据吧。
[color=#FF0000:3k2bd1ix]
ERROR: The Newton method Jacobian matrix of partial derivatives of the equations with respect to the variables to be solved is
singular at observation 1, for iteration 1. The system of equations cannot be solved.
[/color:3k2bd1ix]