|
From: Marcin R. <mry...@gm...> - 2024-03-02 09:33:39
|
Hi Aleksis, The curve origin (curve settlement date) does not necessarily need to correspond to the settlement convention of the instruments used to construct the curve. So, you can safely set it to T+0 and both FX swaps and cross currency swaps, that you use to build the term structure, should price back to par. I hope this answers your question. Kind regards, Marcin On Wed, 28 Feb 2024 at 14:05, Aleksis Ali Raza via QuantLib-users < qua...@li...> wrote: > Perhaps this is a naive question but when bootstrapping a cross currency > curve using FXSwapHelper for short end and > ConstNotionalCrossCurrencyBasisSwapHelper for the long end, I’m running > into an issue where I need to specify the *curve settlement date* > (curve_sett in the code below ) as T+2*. *This is to reflect correct > valuation of the cross currency swaps when priced off the curve. However, > for FXSwapHelpers curve_sett should be T+0 - this is so that ON and TN FX > swaps can be used in the helpers and repriced correctly. The code used is > below. > > How does one get around this issue (without having to work with two > separate curves, or without leaving out ON and TN from the FXSwapHelpers)? > > Thanks, Aleksis > > # FX swaps > fxSwapHelpers = [ql.FxSwapRateHelper(ql.QuoteHandle(q), > ql.QuoteHandle(FX), > m, > int(d), > calendar, > business_convention_base, > end_of_month, > True, > collateral_curve) > for d, q, m in zip(dffxswapsFXspotlag, fxswap_quotes, dffxswapsmaturity)] > > # xccy basis curve > swap_helpers_xccybasis = [ql.ConstNotionalCrossCurrencyBasisSwapRateHelper(ql.QuoteHandle(q), > m, > int(d), > calendar, > business_convention_quote, > end_of_month, > index_base, > index_quote, > collateral_curve, > True, > False) > for q, m, d in zip(xccybasisquotes, xccybasismaturies, dfxccybasisFXspotlag)] > > rate_helpers_xccybasis = fxSwapHelpers + swap_helpers_xccybasis > curve_basis = curve_interpolation(curve_sett, calendar, rate_helpers_xccybasis, curve_daycount) > curve_basis.enableExtrapolation() > final_curve_basis = ql.RelinkableYieldTermStructureHandle(curve_basis) > > > _______________________________________________ > QuantLib-users mailing list > Qua...@li... > https://lists.sourceforge.net/lists/listinfo/quantlib-users > |