|
From: Simone C. <Sim...@ri...> - 2021-09-21 08:05:04
|
Hi Giuseppe, Thanks for pitching in! I am working on C++ indeed – it is not easy for me to share the code as it is embedded in a larger application, but I will do my best to recreate a minimum example where the error shows itself. As per your questions: 1. You are correct, that was a mistake on my explanation – the code is indeed using FuturesRateHelper objects, and it is passing the price and the convexity adjustment to the constructor. 2. With the external library I am getting lower forward rates at the beginning of the curve – but still very much in line with what I was expecting from a spline that goes directly to a future 3M-6M away. Here is a quick plot of the two curves (orange is QuantLib with the deposit rate, blue is the external library without the deposit) – as you can see, there is a small bump at the very front of the QuantLib curve. Further along, the two curves are almost indistinguishable. [cid:image001.png@01D7AEC4.C3498F80] Thanks again! Best regards, Simone From: Giuseppe Trapani <tr...@gm...> Sent: 21 September 2021 08:27 To: Simone Caenazzo <Sim...@ri...> Cc: qua...@li... Subject: Re: [Quantlib-users] Help with "root not bracketed" error when bootstrapping curve without deposit/fixing rate Hi Simone, are you working on C++ or other languages? Can you please share the code (the bare minimum of course)? I'm having a bit of trouble to imagine where the problem can be BUT I can drop a couple of cents here (all coming from my looooong experience with self procured bugs) 1) I see BSBxx are futures, why not using FuturesRateHelper? notice the constructor requires the price, not the rate of the future. 2) Have you checked what rate you get for the front Deposit (the one you are skipping) from your external library? Have a nice day! Il giorno mar 21 set 2021 alle ore 09:11 Simone Caenazzo <Sim...@ri...<mailto:Sim...@ri...>> ha scritto: Dear QuantLib user, I am reaching out as I have encountered an error in QuantLib, and I was hoping someone could give me some help or pointers. The error arises when trying to bootstrap a BSBY (Bloomberg Short-term Bank Yield) curve in QuantLib (version 1.17), using the PiecewiseYieldCurve object. In particular, I am trying to construct the curve as a LIBOR-like curve, using: * BSBY futures (BSB1 to BSB8, in Bloomberg parlance) - these are taken as EuroDollar RateHelpers; * Synthetic BSBY swaps - taken as standard fix-for-float RateHelpers, with 6M, 30/360 Fixed leg and 3M, Act/360 Floating leg. Note that I am NOT using the deposit rate for the front end of the curve - this is a requirement that I need to maintain. Right now, QuantLib fails to calibrate the curve with a "root not bracketed" error on the very first future (BSB1), which as of today is the BSBZ21 instrument with expiry on 15-Dec-2021 and maturity on 15-Mar-2021. However, if I add the BSBY3M deposit rate to the RateHelpers list, the curve calibrates fine and its Discount Factor and Forward rate plots are very reasonable. Two additional thoughts: * This successful experiment with the deposit rate makes me guess that there is nothing inherently wrong with the setup of the other futures' and swaps' RateHelpers per se; * I can also successfully calibrate a curve with another external library without the deposit rate - which makes me think that it is not a "mathematical impossibility" to calibrate the curve with the quotes that I'm using. I would be very grateful if anybody had clues or pointers as per what the problem could be when I try to remove the deposit rate. Thank you very much in advance! Best regards, Simone _______________________________________________ QuantLib-users mailing list Qua...@li...<mailto:Qua...@li...> https://lists.sourceforge.net/lists/listinfo/quantlib-users<https://lists.sourceforge.net/lists/listinfo/quantlib-users> -- Giuseppe Trapani |