|
From: Quant <qua...@gm...> - 2024-05-18 15:24:09
|
Hi Ben & QuantLib users,
Thanks for the feedback and that makes sense.
So, I am bootstrapping a basis-adjusted Sonia curve for a USD-GBP Cross
Currency Basis Swap with 3-month Payments. In this case, SOFR is the
baseCurrencyIndex, SONIA is the quoteCurrencyIndex and SOFR Yield curve is
the collateralCurve because this is a USD collateralized swap.
I have the code below and it's not giving the desired results:
ccbs_helpers = [
ql.ConstNotionalCrossCurrencyBasisSwapRateHelper(ql.QuoteHandle(ql.SimpleQuote(basis
/ 10000)), ql.Period(*tenor),
2, calendar,
ql.Following, False,
sofr, sonia, sofr_ts, True,
False)
for basis, tenor in [(-5.375, (3, ql.Months)), (-6.875, (6, ql.Months)),
(-13.375, (9, ql.Months)), (-12.75, (1, ql.Years)),
(-14.875, (2, ql.Years)), (-17.25, (3, ql.Years)),
(-19.25, (4, ql.Years)), (-20.25, (5, ql.Years)),
(-20.625, (6, ql.Years)), (-20.75, (7, ql.Years)),
(-20.75, (8, ql.Years)), (-20.875, (9, ql.Years)),
(-21, (10, ql.Years)), (-21.75, (12, ql.Years)),
(-24.625, (15, ql.Years)), (-30, (20, ql.Years)),
(-36.25, (30, ql.Years)), (-38.75, (40, ql.Years)),
(-37.75, (50, ql.Years))]]
basis_adj_sonia_curve = ql.YieldTermStructureHandle(
ql.PiecewiseLogCubicDiscount(0, calendar, ccbs_helpers, day_counter))
basis_adj_sonia_curve.enableExtrapolation()
My first guess is that during the bootstrapping process, the
baseCurrencyIndex (SOFR) and the quoteCurrencyIndex (SONIA) are assuming
the payments of the Cross Currency Swap are made daily but the desired
payment frequency is quarterly (3-month period). The question is, how do I
adjust the payment frequency of the baseCurrencyIndex (SOFR) and the
quoteCurrencyIndex (SONIA) in
ql.ConstNotionalCrossCurrencyBasisSwapRateHelper()?
If the question is not clear let me know so that I clarify.
Thanks & regards,
Nk
On Fri, May 17, 2024 at 1:29 AM Ben Watson <ben...@ma...>
wrote:
> cross currency basis is a spread over a floating index. We use this to
> bootstrap curves. It is a direct quote, and no need for a spot FX rate.
>
> The contrast is when we imply a basis over a floating index from forward
> fx pips. In this case we need spot fx.
>
> Ben
>
> On Fri, 17 May 2024, 6:16 am Quant, <qua...@gm...> wrote:
>
>> Hi Quantlib users,
>>
>> When using ql.ConstNotionalCrossCurrencySwapRateHelper() shown below, are
>> we not supposed to have an argument for the quote FX rate? If not how do we
>> adjust for the spot FX rate when bootstrapping the basis adjusted discount
>> curve? Not sure if my question makes sense
>>
>>
>> https://rkapl123.github.io/QLAnnotatedSource/d6/d3d/class_quant_lib_1_1_const_notional_cross_currency_basis_swap_rate_helper.html
>>
>> Thanks & regards,
>> Nk
>> _______________________________________________
>> QuantLib-users mailing list
>> Qua...@li...
>> https://lists.sourceforge.net/lists/listinfo/quantlib-users
>>
>
|