I am working on creating a fixed-fixed cross-currency swap pricer in Python for EUR-USD and GBP-USD pairs. Here's my current approach:

  1. Bootstrap a GBP SONIA curve.
  2. Bootstrap a SOFR curve.
  3. Obtain the GBPUSD xccy basis (GBP LIBOR vs USD LIBOR), e.g., y bp for 10 years.
  4. Compute an adjusted GBP SONIA curve by summing the GBP SONIA Curve and Xccy basis (e.g., the 10-year GBPUSD xccy basis). This is a flat shift in the SONIA curve by the xccy basis.
  5. Discount the USD fixed leg using the SOFR curve.
  6. Discount the GBP fixed leg using the adjusted SONIA curve.
  7. Convert all cashflows to GBP using GBPUSD spot.
  8. Solving for the fixed rate on one of the legs to get a 0 NPV structure

When comparing our pricing with Bloomberg, there is a 10-20 bp difference, which I assume is mostly driven by:

  • Xccy basis referencing LIBOR, but we are applying the shift to the SONIA curve.
  • LIBOR fallback used on one/both legs.
  • No bootstrapping happening on xccy basis; just applying a pure shift of the SONIA curve.


  • We have limited data (only SONIA swaps, SOFR swaps, GBPUSD spot and xccy basis).
  • We aim to get as close as possible to Bloomberg's fixed-fixed xccy rates (within 5 bps).
  • We are using Quantlib and prefer not to do our bootstrapping.

Any suggestions or insights on how to improve our pricing model while working with these constraints would be greatly appreciated!

  • $\begingroup$ in steps 3 and 4, the cross-currency basis should very much not be flat, but rather have a term structure. $\endgroup$ Commented Apr 5, 2023 at 11:28
  • $\begingroup$ Please clarify, in step 3, where do you obtain the cross-currency basis quote? Why is it but one tenor, rather than term structure, and can you obtain more tenors? Does the quote's description say "xccy basis over LIBOR, rather than over RFR" or is it your guess? $\endgroup$ Commented Apr 5, 2023 at 11:49
  • $\begingroup$ @DimitriVulis we get xccy basis quote from our data provider and they have told us that the quote is RFR for GBP and LIBOR for USD. They provide us with a range of tenors. $\endgroup$
    – AB123
    Commented Apr 5, 2023 at 20:41
  • $\begingroup$ Just to add, I'm using QuantLib to do this so any tips on how to adjust the RFR curves with the xccy basis using Quantlib would be greatly appreciated. $\endgroup$
    – AB123
    Commented Apr 5, 2023 at 20:49


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.