3
$\begingroup$

I'm using QuantLibXL to build a discount curve, a zero yield curve and a forward curve of the EURIBOR rate (QuantLibXL is downloadable here).

I've built an object of class PiecewiseYieldCurve through the qlPiecewiseYieldCurve() function and the TraitsID argument is set to ZeroRate.

When I use the qlPiecewiseYieldCurveData() function to get the zero rates, the ObjectHandler returns me the following error message:

qlPiecewiseYieldCurveData - 1st iteration: failed at 1st alive instrument, maturity September 10th, 2013, reference date September 3rd, 2013: invalid value (-1) at index 0

Similar issue with the forward rates curve.

What should I amend in my qlPiecewiseYieldCurve() to make it work properly?

(Maybe this question is more suitable to Stack Overflow than Quantitative Finance Stack Exchange?).

$\endgroup$
4
  • $\begingroup$ It depends on the data you're using. What are you passing to the qlPiecewiseYieldCurve function? $\endgroup$ Aug 30, 2013 at 12:54
  • $\begingroup$ ObjectId = 0 ; NDays = 2 ; Calendar = "Target" ; DayCounter = 0 (default) ; Accuracy = 0 ; TraitsID = "ZeroYield" ; InterpolatorID = "LogLinear". Everything else is equal to 0 or default. The main argument here is RateHelpers, that is an array built up via qlRateHelperSelection() and this function does not return me any error. $\endgroup$
    – Lisa Ann
    Aug 30, 2013 at 13:00
  • $\begingroup$ What are the quoted rates passed to the rate helpers? $\endgroup$ Aug 30, 2013 at 13:05
  • $\begingroup$ Objects of class qlDepositRateHelper built by qlDepositRateHelper2() function; it's a curve made up by EONIA, EURIBOR from 1M to 6M and EUR swaps from 7M to 50Y. No error in that, according to the ObjectHandler. Every rate is a spot rate, not a forward one. $\endgroup$
    – Lisa Ann
    Aug 30, 2013 at 13:12

1 Answer 1

6
$\begingroup$

Ok, I've done some digging in the code. It's an issue with the LogLinear interpolation; while trying to find the correct rate for the 1-week node, the bootstrapper wanders unchecked into a region of negative rates and the logarithms blow up. At this time, I'm afraid the workaround is just to use some other interpolation. Or recompile the library and the addin disabling negative rates, but that's a lot more complex...

Would you mind reporting this as a bug on the QuantLib mailing list, or the bug tracker at http://sourceforge.net/p/quantlib/bugs/? (You might need a SourceForge login for the tracker.)

$\endgroup$
2
  • $\begingroup$ Actually, with Linear it works fine. Your explanation of the issue is perfect, thank you. Just a question before accepting your answer (it's the second time you help me with QuantLib related issues, thank you very much): considering I need to deal with QuantLib during the next months, do you suggest me to subscribe to its mailing list to ask about specific code's issues like this? $\endgroup$
    – Lisa Ann
    Aug 30, 2013 at 15:11
  • $\begingroup$ Yes, I'd subscribe. $\endgroup$ Aug 30, 2013 at 15:34

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.