Class NelsonSiegelSvensson

Inheritance Relationships

Base Type

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.

double evaluate(const std::array<double, 1> &x) const override
virtual void set_transformed_calibration_parameters(const std::vector<double> &transformed_parameters) override

set the transformed parameters for calibration.

Parameters:

transformed_calibration_parameters – the transformed calibration parameters

inline virtual std::vector<double> get_parameters() const override

Get the model’s raw parameters.

Returns:

A vector containing the model’s parameters.

virtual std::vector<double> get_transformed_calibration_parameters() const override

get the transformed parameters for calibration.

Returns:

the transformed parameters for calibration

inline virtual std::string name() const override

Get the model’s name.

Returns:

A string representing the name of the model.

inline double get_curvature2() const
inline void set_curvature2(double curvature2)
inline double get_tau2() const
inline void set_tau2(double tau2)