Take the 2-minute tour ×
Quantitative Finance Stack Exchange is a question and answer site for finance professionals and academics. It's 100% free, no registration required.

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

share|improve this question
    
It depends on the data you're using. What are you passing to the qlPiecewiseYieldCurve function? –  Luigi Ballabio Aug 30 '13 at 12:54
    
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. –  Lisa Ann Aug 30 '13 at 13:00
    
What are the quoted rates passed to the rate helpers? –  Luigi Ballabio Aug 30 '13 at 13:05
    
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. –  Lisa Ann Aug 30 '13 at 13:12

1 Answer 1

up vote 5 down vote accepted

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

share|improve this answer
    
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? –  Lisa Ann Aug 30 '13 at 15:11
    
Yes, I'd subscribe. –  Luigi Ballabio Aug 30 '13 at 15:34

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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