QuantLib icon indicating copy to clipboard operation
QuantLib copied to clipboard

Applying spreads to forward rates

Open theomontel opened this issue 1 year ago • 4 comments

As discussed in the email chain, it would be useful in my view to be able to apply spreads to forward rates. I would like to be able to provide a set of data such as:

start_date end_date spread_bp

and apply those to curves, rather than being restricted to use spreads from spot as is currently the case

theomontel avatar Dec 14 '24 12:12 theomontel

Thanks for posting! It might take a while before we look at your issue, so don't worry if there seems to be no feedback. We'll get to it.

boring-cyborg[bot] avatar Dec 14 '24 12:12 boring-cyborg[bot]

Are we talking about an implementation like "InterpolatedPiecewiseForwardSpreadedTermStructure"?

sophistis42 avatar Jan 06 '25 14:01 sophistis42

Alternatively how about something like --> ForwardSpreadedTermStructure(Handle<YieldTermStructure>, Handle<Quote> spread, const Date& refPeriodStart = Date(), const Date& refPeriodEnd = Date());

Where also we tweak: ForwardSpreadedTermStructure::forwardImpl(Time t) to conditionally add the spread if in range?

sophistis42 avatar Jan 06 '25 17:01 sophistis42

Apologies for my initial spec, I would need to specify time-dependent spreads on the forwards, furthermore I have realised that what I'm looking to do can be achieved using backwardflat interpolation so I think your suggestion of InterpolatedPiecewiseForwardSpreadedTermStructure sounds great

theomontel avatar Jan 06 '25 18:01 theomontel