|
From: Tom A. <tw...@ur...> - 2022-08-11 10:44:52
|
Hi Roberto, I was not involved in this decision. But in my limited experience, it is rare for people trading rates derivatives to use a parametric curve like Nelson-Siegel-Svensson; rather, we use interpolated curves, like splines and so on. Parametric curves are more commonly used with bonds. Why is this? Assuming it is not just a random historical accident, i think this is because rate derivatives have a greater degree of fungibility with each other than bonds do. In very loose terms, rate derivatives are various slices of some consistent underlying term structure, and have potentially infinite supply. Whereas bonds are individual things that trade according to their own particular dynamics, and have fixed supply. Both derive their value from discounted future cashflows, but there are idiosyncractic supply and demand effects that can push bond prices away from the "true" value of their cashflows. That means that trying to draw a spline through bond yields (or implied forwards etc) makes no sense. There is no reason to think that all bond yields sit exactly on some smooth, meaningful term structure. So, instead, we fit a parametric model, which tries to extract such a term structure from the soup of idiosyncratic pricing noise. We could also do this for rate derivatives. But since we have a lot more confidence in the consistency of their pricing, there's no point. We can just use a spline. I could be completely wrong about this, though. I have never seen this discussed explicitly. Regards, tom On Wed, 10 Aug 2022, Roberto Cocchi wrote: > 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 ] > > > > > > > -- There's no future. |