|
From: Roberto C. <rob...@so...> - 2022-08-10 19:31:41
|
Dear all I'm working w Claudio on this topic. I am asking myself (and anyone that sees fit to have an opinion) why does fitting (NSS, etc) been implemented only for Govt Bonds? Is it that it does not make sense in the case of pure yield bearing instruments, such as swaps, FRA's, MM? Else, if it made sense, it would have been implemented time ago. Your thoughts? Roberto Sent: Thursday, 4 August, 2022 13:05:08 Subject: Re: [Quantlib-users] Rate curves with Nelson Siegel Svensson Hello Claudio, you can modify the FittedBondDiscountCurve class so that it can use generic RateHelper instances, but it will miss some features. Also, do keep into account that while PiecewiseYieldCurve creates a curve that reproduces the inputs exactly, FittedBondDiscountCurve doesn't, so I would check if that's acceptable for you. This said: you can replace BondHelper with RateHelper in the FittedBondDiscountCurve class, but you'll have to comment out some code that would not compile. One such place is < [ https://urlsand.esvalabs.com/?u=https%3A%2F%2Fgithub.com%2Flballabio%2FQuantLib%2Fblob%2Fmaster%2Fql%2Ftermstructures%2Fyield%2Ffittedbonddiscountcurve.cpp%23L98-L110&e=8b2395da&h=278c8320&f=y&p=n | https://github.com/lballabio/QuantLib/blob/master/ql/termstructures/yield/fittedbonddiscountcurve.cpp#L98-L110 ] >; these are a few checks and you can live without them. Another place is < [ https://urlsand.esvalabs.com/?u=https%3A%2F%2Fgithub.com%2Flballabio%2FQuantLib%2Fblob%2Fmaster%2Fql%2Ftermstructures%2Fyield%2Ffittedbonddiscountcurve.cpp%23L98-L110&e=8b2395da&h=278c8320&f=y&p=n | https://github.com/lballabio/QuantLib/blob/master/ql/termstructures/yield/fittedbonddiscountcurve.cpp#L98-L110 ] >: commenting this out means that you can't rely on the curve for calculating the calibration weights and you'll have to pass them in explicitly. Hope this helps, Luigi On Tue, Aug 2, 2022 at 3:39 PM Claudio D'Angelo < [ mailto:cla...@so... | cla...@so... ] > wrote: Hello all, let me introduce myself, I'm a java developer, I need to modify an application that is usimg quantlib (via SWIG). Currently this application is creating curves using the class PiecewiseYieldCurve and passing rates like RfaRate and DepositRate, both using a SimpleQuote containing the yield value of the rate. Now I would interpolate/fit the curve using the NSS, checking the API seems the only class that can implement this fitting is the FittedBondDiscountCurve. Unfortunately this class wants in input a BondHelper or a Fixed RateBondHelper, both of them work using bond data and the price. Is it possible to implement a curve using the NSS but with rates with only yield values (naturally with other data but not a bond and a price as input). I don't know if I was clear, unfortunately I don't have experience with quant, quantlib and C++ and I need help in order to understand better and resolve my issue. Thank you very much in advance to all. Claudio _______________________________________________ QuantLib-users mailing list [ mailto:Qua...@li... | Qua...@li... ] [ https://urlsand.esvalabs.com/?u=https%3A%2F%2Flists.sourceforge.net%2Flists%2Flistinfo%2Fquantlib-users&e=8b2395da&h=5e0eb166&f=y&p=n | https://lists.sourceforge.net/lists/listinfo/quantlib-users ] -- EXTERNAL E-MAIL. Message from outside of SoftSolutions! Do not click links or download/open attachments unless you trust the sender and believe the content is safe. _______________________________________________ QuantLib-users mailing list Qua...@li... https://urlsand.esvalabs.com/?u=https%3A%2F%2Flists.sourceforge.net%2Flists%2Flistinfo%2Fquantlib-users&e=8b2395da&h=5e0eb166&f=y&p=n |