QuantLib icon indicating copy to clipboard operation
QuantLib copied to clipboard

fixed reference date piecewise curve re-bootstraps on global evaluation date changes

Open pcaspers opened this issue 9 years ago • 0 comments

If you set up a PiecewiseYieldCurve (or similar structures for Inflation, Default, etc.) with a fixed reference date, the object still reacts to changes in the evaluation date. This is because most of the rate helpers (like Swap, FRA, Deposit) are relative date helpers and there is no version that does not register with the evaluation date. Thus, the curve will be re-bootstrapped with shifted helpers, but still having the old reference date. I would expect the curve only to react on quote changes in the helpers, but it should behave independently of the global evaluation date. The solution could go in the direction to expose the moving_ flag in TermStructure as an inspector and make the bootstrap helpers moving or not depending on this flag. But this is not easy, since the helpers might be used in several term structures, some of them moving, others not. One could also provide different versions of the rate helpers (fixed / float date) and check that only consistent ones are used to bootstrap a curve. Or skip the check and just provide them.

In the end I want to be able to set up a PiecewiseYieldCurve with fixed reference date that wouldn't re-bootstrap on evaluation date changes. Today the only workaround seems to be to make a copy of the bootstrapped curve as a InterpolatedDiscountCurve or the like.

pcaspers avatar Feb 19 '16 17:02 pcaspers