#70 Cross currency rate helper


This file contributes new rate helpers to the QuantLib library in order to support the building of discount curves from cross currency swaps.
Implemented are constant notional cross currency swaps. I've checked the code for the pair EUR/USD in two directions: Bootstrapping of the
yield curve on the spread leg and on the flat leg. Both are checked against results from productive environments and seemed to work.
There are two obvious things left to do:
- Implementation of the forward start feature
- based on the previous step, implementation of mtm cross currency swaps.
Both extensions should be minor exercises.


  • Luigi Ballabio

    Luigi Ballabio - 2012-10-24

    May you contribute a test case for these?


  • Mehdi Bouassab

    Mehdi Bouassab - 2013-03-17

    I have tried first to use the XCCySwapRateHelper class for calculating a EUR/USD basis spread through the impliedQuote() method. After setting appropriate yield termstructures for each currency, calling impliedQuote() cause the program to crash with an empty handle exception in the BlackIborCouponPricer::initialize method. To solve that, one need to ensure that the yield term structure is not empty in flatLegIborIndex_ and sprdLegIborIndex_ in order to calculate the spread , contrary to other RateHelper (Swap,Deposit...). I think that this case should be handled in t XCCySwapRateHelper::impliedQuote() .

  • Mehdi Bouassab

    Mehdi Bouassab - 2013-04-14

    I have introduced some changes on the xccyratehelper class, added the forward start feature while ensuring that:

    -A Cross currency swap should be consistent with a vanilla swap:
    I have tested the case when the two legs have the same currency and checked that the calculated implied quote from a crossxccyratehelper match with a one from a swapratehelper.

    -The forward start feature is in line with the swap feature:
    I have tested that the implied quote calculated when the two legs have the same currency matches with the swap's implied quote.

    Along with hpp and cpp files, you'll find a test case(Test_xccyratehelper.cpp).



  • Luigi Ballabio

    Luigi Ballabio - 2013-04-19

    are you happy with Mehdi's additions? If so, I'll go ahead.

    • Andre Miemiec

      Andre Miemiec - 2016-01-12

      Hi Luigi!

      sorry for the delay. I would prefer if you could consider to include the version as of 2012-09-18 without Mehdis additions into the library. The reason is simply that I had no time to check it carefully.

      Yours sincerly


      • Luigi Ballabio

        Luigi Ballabio - 2016-01-15

        Hi Andre,
        sorry, it seems like we both kept this submission hanging. Last year, another implementation from Ferdinando's group was added to the library (see FxSwapRateHelper in ql/termstructures/yield/ratehelpers.hpp). I'll keep this one open until you find some time to compare the two and see if there's any differences.


  • p123

    p123 - 2014-05-07

    HI, Mehdi,

    I tried to run your code but got some error message like the "XCCySwapRateHelper" does not take 14 inputs. It seems the example is not consistent with the cpp file for XCCySwapRateHelper. Did you get same message? Thank you, Pat


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks