0
$\begingroup$

I am trying to create a spreadsheet using the Quantlib xll to convert deposit/swap rates to zero rates. I tried to implement such by referencing to the C++ code listed here:

How to sum interest rate curves in QuantLib

However I am stuck at combining the depositRateHelper and swapRateHelper into RateHelper, as far as I know Quantlib XL does no thave the RateHelper object and trying to create a piecewiseyieldcurve by simply combining all depositRateHelper and SwapRateHelper object would result in an error as PieceWiseYieldCurve fails to take DepositRateHelper object and convert to RateHelper object.

Is there any way I can explicitly convert the DespositRateHelper into RateHelper? Or in general, if there is an easier way that would take a range of tenors and rates (one block for deposit rates and one block for swap rates) to give me a PieceWiseYieldCurve object for me to obtain the zero rates? My only requirement is to use the original QuantlibXL and create that on a Excel spreadsheet. Unfortunately I think there is very little documentation online specifically for the XLL.

Thanks a lot!

$\endgroup$
  • $\begingroup$ You should be able to simply pass to PiecewiseYieldCurve the list of the deposit and swap rate helpers you created. The conversion to RateHelper should be done internally. What are the function calls you're making? And what is the error you're getting back? (To retrieve the error message, you can call the ohRangeRetrieveError function on the cell causing the error.) $\endgroup$ – Luigi Ballabio May 3 '16 at 8:34
  • $\begingroup$ @LuigiBallabio I noticed I used the RateHelper2 in some instance, does that matter? I mean other than the differences in inputs, does RateHelp and RateHelper2 generate exactly the same object? Appreciate your help. $\endgroup$ – AZhu May 3 '16 at 11:25
  • $\begingroup$ Yes, they create objects of the same class. $\endgroup$ – Luigi Ballabio May 3 '16 at 12:37
  • $\begingroup$ @LuigiBallabio Thanks for your help, for some reason using DepositRateHelper rather than Helper2 helped me to generate the object successfully. $\endgroup$ – AZhu May 5 '16 at 11:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.