Class NelsonSiegelSvensson
Defined in File nelson_siegel_svensson.hpp
Inheritance Relationships
Base Type
public otyca::NelsonSiegel
(Class NelsonSiegel)
Class Documentation
-
class NelsonSiegelSvensson : public otyca::NelsonSiegel
Extended Nelson-Siegel model with an additional curvature term.
This class implements the Nelson-Siegel-Svensson model which adds a second curvature term to the original Nelson-Siegel formulation to better fit the term structure of interest rates.
Public Functions
-
inline NelsonSiegelSvensson()
Default constructor. Initializes parameters to NaN.
-
inline NelsonSiegelSvensson(double level, double slope, double curvature1, double tau1, double curvature2, double tau2)
Construct from specified model parameters.
- Parameters:
level – Level component.
slope – Slope component.
curvature1 – First curvature component (from Nelson-Siegel).
tau1 – Decay rate for first curvature term.
curvature2 – Second curvature component (Svensson extension).
tau2 – Decay rate for second curvature term.
-
virtual double evaluate(const std::array<double, 1> &x) const
Evaluate the model at a given point.
- Parameters:
x – A single-element array containing the maturity.
- Returns:
The value of the yield curve at the given maturity.
-
inline virtual void set_transformed_calibration_parameters(const std::vector<double> &transformed_parameters)
Set model parameters using transformed (unconstrained) values.
- Parameters:
transformed_parameters – A vector of 6 parameters: [level, slope, curvature1, log(tau1), curvature2, log(tau2)].
-
inline virtual std::vector<double> get_parameters() const
Get model parameters in their original (constrained) form.
- Returns:
A vector of 6 parameters: [level, slope, curvature1, tau1, curvature2, tau2].
-
inline virtual std::vector<double> get_transformed_calibration_parameters() const
Get transformed model parameters for optimization.
- Returns:
A vector of transformed parameters: [level, slope, curvature1, log(tau1), curvature2, log(tau2)].
-
inline virtual std::string name() const
Get the name of the model.
- Returns:
“NelsonSiegelSvensson”
-
inline double get_curvature2() const
-
inline void set_curvature2(double curvature2)
-
inline double get_tau2() const
-
inline void set_tau2(double tau2)
-
inline NelsonSiegelSvensson()