CDS Bootstrapping Error

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

CDS Bootstrapping Error

Daniel Garcia
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

------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: CDS Bootstrapping Error

Peter Caspers-4
Hi Daniel,

looks like your input instrument’s exhibit arbitrage for the longer maturities? Off the top of my head I’d say QL tries to ensure positive hazard rates, i.e. arbitrage free curves. Not sure though.

Where do you get the input data from? Can you preprocess it and make it arbitrage free?

Regards
Peter

> Am 20.04.2016 um 17:05 schrieb Daniel Garcia <[hidden email]>:
>
> 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
> ------------------------------------------------------------------------------
> Find and fix application performance issues faster with Applications Manager
> Applications Manager provides deep performance insights into multiple tiers of
> your business applications. It resolves application problems quickly and
> reduces your MTTR. Get your free trial!
> https://ad.doubleclick.net/ddm/clk/302982198;130105516;z_______________________________________________
> QuantLib-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/quantlib-users


------------------------------------------------------------------------------
Find and fix application performance issues faster with Applications Manager
Applications Manager provides deep performance insights into multiple tiers of
your business applications. It resolves application problems quickly and
reduces your MTTR. Get your free trial!
https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users