|
From: Marcin R. <mry...@gm...> - 2022-08-02 13:03:43
|
Hi Jen, Ben, Yes, you can build a CSA curve directly in QuantLib. For that you could use the cross currency basis swap rate helper (either constant or resetting notional options are available) or the FX swap rate helper to imply the basis from FX instruments. The helpers take the collateral currency risk-free curve handle as parameter, so the final bootstrapped curve will be the desired CSA curve. For references in C++ you could check the unit tests for cross currency rate helpers: https://github.com/lballabio/QuantLib/blob/master/test-suite/crosscurrencyratehelpers.cpp There are also unit tests in Python that demonstrate how the CSA curve can be built: https://github.com/lballabio/QuantLib-SWIG/blob/84b07cb77639f251b46838cbfeebdea4ca01e2ef/Python/test/ratehelpers.py#L614 Hope this helps. Regards, Marcin On Tue, 2 Aug 2022 at 14:45, Ben Watson <ben...@ma...> wrote: > It supports a different discount curve to the forward curve. For CSA > discounting I manually built the curves from the XCCY basis curves and the > local collateral curve. This was done by manually FX adjusting the DF from > using XCCY curves and building a new curve from the discount factors. > > > > However with the newly RFR XCCY basis being directly quoted just need to > add the basis to your RFR curves…. > > For example I have a SOFR.USD curve, and there is a direct RFR XCCY basis > to get to SONIA. So add the basis to the SONIA curve and you get SOFR.GBP – > this becomes your collateral curve when GBP is posted against a USD swap. > > > > Hope that help > > > > Ben > > > > > > *From:* Jen Vass <ge...@gm...> > *Sent:* Tuesday, 2 August 2022 9:11 PM > *To:* Qua...@li... > *Subject:* [Quantlib-users] Discount and forward Curve building via CSA > Discounting for IRS/CCIRS valuation > > > > Dear quantlib users! > > > > I need your help. Could you please advise - does quantlib support CSA > discounting when collateral posted in difference currencies? Are there any > examples? > > > > Thank you in advance, > > Eugenia Vaissel > _______________________________________________ > QuantLib-users mailing list > Qua...@li... > https://lists.sourceforge.net/lists/listinfo/quantlib-users > |