Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#70 Cross currency rate helper

open
nobody
None
5
2014-08-22
2012-09-18
Andre Miemiec
No

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.

Discussion

  • Andre Miemiec
    Andre Miemiec
    2012-09-18

    new files

     
    Attachments
  • Luigi Ballabio
    Luigi Ballabio
    2012-10-24

    May you contribute a test case for these?

    Thanks,
    Luigi

     
  • 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() .

     
  • Andre Miemiec
    Andre Miemiec
    2013-04-10

    Added test file for the Rate Helper class

     
  • 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).

    Regards

    Mehdi

     
  • Luigi Ballabio
    Luigi Ballabio
    2013-04-19

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

     
  • 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