Re: exception "Could not bootstrap curve"

Posted by Luigi Ballabio-2 on
URL: http://quantlib.414.s1.nabble.com/exception-Could-not-bootstrap-curve-tp3343p3346.html

On 2004.09.24 16:00, [hidden email] wrote:
> > which version of QuantLib are you using?
> 0.3.4

Hmm, oldish. Wait a minute while I fetch it from CVS...

Ok, I see. In ql/TermStructures/piecewiseflatforward.cpp, line 116,  
there's

            double min = accuracy_*10e-4, max = discounts_[i-1];
            try {
                solver.solve(FFObjFunction(this,instrument,i),
                             accuracy_,guess,min,max);

Setting min to a small number says that discounts must be positive,  
which must be enforced. Setting max to the previous value says that the  
discounts must be decreasing, which in turn means that rates must be  
positive. You can try increasing max (say, twice the previous discount)  
to allow negative rates.

Hope this helps,
        Luigi