http://quantlib.414.s1.nabble.com/CDS-Bootstrapping-Error-tp17419.html
Dear,
I'm having a root not bracketed error when trying to bootstrap a CDS structure.
// Bootstrap hazard rates
boost::shared_ptr<PiecewiseDefaultCurve<HazardRate, BackwardFlat> >
hazardRateStructure(
new PiecewiseDefaultCurve<HazardRate, BackwardFlat>(
todaysDate,
instruments,
dayCounter
));
The error is:
1st iteration: failed at 23rd alive instrument, pillar September 30th, 2051, maturity September 30th, 2051, reference date September 30th, 2028: root
not bracketed: f[2.22045e-016,1] -> [-1.314319e-006,-9.924420e-003]
I have replicated the BackWardFlat bootstrapping in excel and, although with certain tolerance to the mean square error. (0.92), we get a proper lambda structure.
Not sure about how to deal with this on Quantlib. I'm trying to give some tolerance to my PiecewiseDefaultCurve method but with no luck.
boost::shared_ptr<PiecewiseDefaultCurve<HazardRate, BackwardFlat> >
hazardRateStructure(
new PiecewiseDefaultCurve<HazardRate, BackwardFlat>(
todaysDate,
instruments,
dayCounter,
0.1 <= ( I have tested several options with no result)
));
Would you please have any suggestion?
Many thanks in advance,
Best regards
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!