Class GeneralizedNelsonSiegel
Defined in File generalized_nelson_siegel.hpp
Inheritance Relationships
Base Type
public otyca::Model< 1 >
(Template Class Model)
Class Documentation
-
class GeneralizedNelsonSiegel : public otyca::Model<1>
Implements the Generalized Nelson-Siegel model.
This model extends the Nelson-Siegel approach by including multiple slope and curvature components.
Public Functions
-
inline GeneralizedNelsonSiegel()
Default constructor initializing level to NaN.
-
inline GeneralizedNelsonSiegel(double level)
Constructor initializing the level component.
- Parameters:
level – The initial level value.
-
std::vector<double> evaluate(const std::vector<std::array<double, 1>> &x) const
-
inline 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 void set_parameters(const std::vector<double> ¶meters) override
Set the model’s raw parameters.
- Parameters:
parameters – A vector of new parameter values.
-
inline virtual std::vector<double> get_parameters() const override
Get the model’s raw parameters.
- Returns:
A vector containing the model’s parameters.
-
inline 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 void add_slope_component(double slope, double tau)
Adds a slope component to the model.
- Parameters:
slope – The slope coefficient.
tau – The decay factor.
-
inline void add_curvature_component(double slope, double tau)
Adds a curvature component to the model.
- Parameters:
slope – The curvature coefficient.
tau – The decay factor.
-
inline GeneralizedNelsonSiegel()