QuantLib icon indicating copy to clipboard operation
QuantLib copied to clipboard

Improving ql.ConstNotionalCrossCurrencyBasisSwapRateHelper and ql.MtMCrossCurrencyBasisSwapRateHelper

Open QuantAnalyst89 opened this issue 1 year ago • 1 comments

Improving the ql.ConstNotionalCrossCurrencyBasisSwapRateHelper and ql.MtMCrossCurrencyBasisSwapRateHelper by adding a constructor that takes an overnight index and payment frequency as parameters.

The current helpers have parameters in the link below:

https://rkapl123.github.io/QLAnnotatedSource/df/d10/crosscurrencyratehelpers_8cpp_source.html

QuantAnalyst89 avatar May 20 '24 13:05 QuantAnalyst89

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 May 20 '24 13:05 boring-cyborg[bot]

I'm happy to have a go at this. I recently built these curves for a validation project and encountered this problem too.

kp9991-git avatar Feb 28 '25 07:02 kp9991-git

It's going to take a little more time than what I thought initially. I've added the O/N index and payment frequency, it's simple enough but I looked deeper at the xccy helpers and these features are insufficient. At a minimum one also needs to have the payment lag in order to match the market conventions. That in turn means a slightly more involved valuation (which collapses to the standard valuation in simple cases). I'll keeping on looking at it and will update when I have a PR.

kp9991-git avatar Mar 05 '25 06:03 kp9991-git

Ok, thanks. If you haven't already, it might help to look at how OvernightLeg and OvernightIndexedSwap manage to do it.

lballabio avatar Mar 05 '25 10:03 lballabio

I've pushed PRs for this (one adds the functionality in QuantLib, the other adds the ability to use this functionality from the Python layer in the SWIG project)

kp9991-git avatar Mar 08 '25 23:03 kp9991-git

Fixed by #2168.

lballabio avatar Mar 17 '25 10:03 lballabio