|
From: 蔡宗儒-風險管理處-銀行 <Jas...@si...> - 2011-03-25 05:39:39
|
Hello,
I'm the user of QuantLib.
I have some question about optimization.
I use the optimization method LevenbergMarquardt and the cost function OneDimensionalPolynomialDegreeN in optimizers.cpp
I solve the following eqtions seperately(I did not solve together)
E1 = 1+x+x^2
E2 = -1+x+x^2
In E1, I get the right solution, (x ,E1)=(-0.5 , 0.75)
In E2, I get the wrong solution, (x,E2)=(-0.6180 , 0)
I think the reason why E2 get the wrong answear is that LevenbergMarquardt method use "MINPACK.lmdif".The MINPACK.lmdif seems to minize the sum of square.
That means it dose not minize the equation but MSE.
Therefore,I think LevenbergMarquardt in QuantLib seems to min the value (E1-0)^2 in E1 and min the value (E2-0)^2 in E2.Hence I got the wrong solution.
So, did I use the method wrong ?
Or QuantLib use the wrong methd "MINPACK.lmdif" ?
Regards,
蔡宗儒 Jason Tsai
永豐銀行風險管理處
TEL:81618681
FAX:81618482
|