I'm new using QuantLib. I would like to construct a bond curve using some parameters of NS model. All I found was the other way around, give some bonds and get the parameters.
For example, I want to construct a bond curve using NS with parameters [0.03;-0.02;0; 0.17; 0.08].
I tried to use "setPricingEngine" or "DiscountingBondEngine" what I was not lucky.
Any comment would be very helpful.
Thank You
There's no such possibility at this time. To enable it, you could do something like:
NelsonSiegelFitting
class that takes the parameters and uses them to fill thesolution_
array;FittedBondDiscountCurve
class that takes a pre-built fitting method and no bonds.calculate
method ofFittedBondDiscountCurve
so that it skips the optimization if no bonds were given.This way, you could build the NS fitting with the desired parameters, pass it to the curve, and then use the curve in the discounting engine.
If you manage it, please consider contributing your changes to the library.