Hi, group; I got some strange issue with the Hull-White analytic formulae calibration with simplex method on swaption volatility. I finished one year calibration except on the day "2005-03-01", and here is error message: In function `QuantLib::Real QuantLib::Solver1D<Impl>::solve(const F&, QuantLib::Real, QuantLib::Real, QuantLib::Real, QuantLib::Real) const [with F = QuantLib::JamshidianSwaptionEngine::rStarFinder, Impl = QuantLib::Brent]': root not bracketed: f[-10,10] -> [8.054229e-05,8.054229e-05] Could someone tell what is the problem? Thanks. Guowen |
On 11/22/2005 07:41:23 PM, Guowen Han wrote:
> I got some strange issue with the Hull-White analytic formulae > calibration with simplex method on swaption volatility. > > I finished one year calibration except on the day "2005-03-01", and > here is error message: > ... > root not bracketed: f[-10,10] -> [8.054229e-05,8.054229e-05] > > Could someone tell what is the problem? Hard to say without seeing the data. However, the error above means that the solver cannot find a value corresponding to your data. Shortly, it is trying to find a value for which its results are negative (i.e., below your input datum) and one for which is positive (i.e., above the input) so that it can scan the range between the two values and find the zero (i.e., the value corresponding to the input.) But it cannot find such a bracket, since all it finds are positive results. Later, Luigi ---------------------------------------- Within C++, there is a much smaller and cleaner language struggling to get out. -- Bjarne Stroustrup |
Hi, Luigi; I guess the step (lambda) for Simplex method was too small. After I increase it, it work fine. // Simplex simplex(0.05, 1e-10); Simplex simplex(0.1, 1e-10); One other thing, is there any big picture of the code design? I have some basic idea for design patterns, but it is still very hard for me to understand the code. Thanks. Guowen
On 11/22/2005 07:41:23 PM, Guowen Han wrote: > I got some strange issue with the Hull-White analytic formulae > calibration with simplex method on swaption volatility. > > I finished one year calibration except on the day "2005-03-01", and > here is error message: > ... > root not bracketed: f[-10,10] -> [8.054229e-05,8.054229e-05] > > Could someone tell what is the problem? Hard to say without seeing the data. However, the error above means that the solver cannot find a value corresponding to your data. Shortly, it is trying to find a value for which its results are negative (i.e., below your input datum) and one for which is positive (i.e., above the input) so that it can scan the range between the two values and find the zero (i.e., the value corresponding to the input.) But it cannot find such a bracket, since all it finds are positive results. Later, Luigi ---------------------------------------- Within C++, there is a much smaller and cleaner language struggling to get out. -- Bjarne Stroustrup ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_idv37&alloc_id865&op=click _______________________________________________ Quantlib-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/quantlib-users |
On 11/29/2005 05:53:20 PM, Guowen Han wrote:
> I guess the step (lambda) for Simplex method was too small. After I > increase it, it work fine. > > // Simplex simplex(0.05, 1e-10); > Simplex simplex(0.1, 1e-10); Glad to hear it. > One other thing, is there any big picture of the code design? > I have some basic idea for design patterns, but it is still very hard > for me to understand the code. Yes, I'm aware of the problem. I'm slowly trying to write something. Later, Luigi ---------------------------------------- Brady's First Law of Problem Solving: When confronted by a difficult problem, you can solve it more easily by reducing it to the question, "How would the Lone Ranger have handled this?" |
Free forum by Nabble | Edit this page |