luphord / nelson_siegel_svensson

Implementation of the Nelson-Siegel-Svensson interest rate curve model.
MIT License
110 stars 41 forks source link

getting curve from slope, curvature #4

Closed lorrp1 closed 3 years ago

lorrp1 commented 3 years ago

Hello, i have slope, curvature and i would like to get the nelson_siegel curve (the b0, b1, b2 parameters)

luphord commented 3 years ago

Could you be more specific what your issue is with this library?

lorrp1 commented 3 years ago

@luphord I just don’t understand how to get this for example : NelsonSiegelCurve(beta0=0.04201739383636799, beta1=-0.031829031569430594, beta2=-0.026797319779108236) from level, slope and curvature values

luphord commented 3 years ago

@lorrp1 Are you implying a quadratic model for the yield curve that you wish to transform into a Nelson-Siegel-Curve? Something like r(t) = level + slope \cdot t + \frac{curvature}{2} \cdot t^2

If so, you cannot match this model exactly with a Nelson-Siegel-Curve as it is not quadratic. Your best bet would be matching first and second order derivative at time 0.

luphord commented 3 years ago

@lorrp1 Are you still interested in this topic or can the issue be closed?