Class LCIR
Defined in File lcir.hpp
Inheritance Relationships
Base Type
public otyca::TimeChangeProcess
(Class TimeChangeProcess)
Derived Types
public otyca::CIR
(Class CIR)public otyca::FLCIR
(Class FLCIR)
Class Documentation
-
class LCIR : public otyca::TimeChangeProcess
Represents a CIR (Cox-Ingersoll-Ross) process with leverage.
The LCIR class models a Cox-Ingersoll-Ross (CIR) process with an additional correlation (leverage) between the CIR process and an external source of randomness, such as an underlying asset return process.
Subclassed by otyca::CIR, otyca::FLCIR
Public Functions
-
inline LCIR(double Kappa, double Omega, double V0, double Rho, double Sigma)
-
inline LCIR()
-
inline virtual LCIR *clone() const override
Clone the current TimeChangeProcess instance.
- Returns:
A pointer to a newly allocated copy of the TimeChangeProcess object.
-
virtual arma::cx_mat laplace_transform(const arma::rowvec &t, const arma::cx_colvec &u, const arma::cx_colvec &psi) const override
Compute the Laplace transform of the process.
The Laplace transform is applied to the time vector, along with Complex-valued column vector of Fourier arguments (u) and the characteristic exponent (psi), to produce the characteristic function (phi).
- Parameters:
t – The time vector for which the Laplace transform is computed.
u – Complex-valued column vector of Fourier arguments.
psi – The characteristic exponent.
- Returns:
The resulting Laplace-transformed characteristic function.
-
virtual arma::cx_mat d_phi_d_psi(const arma::rowvec &t, const arma::cx_colvec &u, const arma::cx_colvec &psi) const override
Compute the derivative of the Laplace transform with respect to psi.
This method calculates the derivative of the characteristic function phi with respect to the characteristic exponent psi, and stores the result in d_phi_d_psi.
- Parameters:
t – The time vector for which the Laplace transform is computed.
u – Complex-valued column vector of Fourier arguments.
psi – The characteristic exponent.
- Returns:
The matrix to store the derivative of the Laplace transform with respect to psi.
-
virtual std::vector<arma::cx_mat> d_phi_d_p(const arma::rowvec &t, const arma::cx_colvec &u, const arma::cx_colvec &psi) const override
Compute the derivative of the Laplace transform with respect to parameters.
This method computes the derivative of the Laplace transform with respect to its parameters and stores the result in d_phi_d_params.
- Parameters:
t – The time vector for which the Laplace transform is computed.
u – Complex-valued column vector of Fourier arguments.
psi – The characteristic exponent.
- Returns:
The vector to store the derivatives with respect to parameters.
-
inline double get_multiplier() const
-
inline void set_multiplier(double multiplier)
-
inline double get_kappa() const
-
inline double get_omega() const
-
inline double get_rho() const
-
inline double get_v0() const
-
inline double get_sigma() const
-
inline void set_kappa(double _Kappa)
-
inline void set_omega(double _Omega)
-
inline void set_rho(double _Rho)
-
inline void set_v0(double _V0)
-
inline void set_sigma(double _Sigma)
-
virtual std::vector<double> transformation_derivatives() const override
Get derivatives of the transformation with respect to the raw parameters.
Used for Jacobian computation during calibration.
- Returns:
A vector of derivatives (default: all 1).
-
virtual void set_transformed_calibration_parameters(const std::vector<double>&)
set the transformed parameters for calibration.
- Parameters:
transformed_calibration_parameters – the transformed calibration parameters
-
virtual std::vector<double> get_transformed_calibration_parameters() const
get the transformed parameters for calibration.
- Returns:
the transformed parameters for calibration
-
inline virtual std::vector<double> get_parameters() const
Get the model’s raw parameters.
- Returns:
A vector containing the model’s parameters.
-
inline virtual void set_parameters(const std::vector<double> ¶meters)
Set the model’s raw parameters.
- Parameters:
parameters – A vector of new parameter values.
-
inline virtual int sigma_parameter_index() const
-
virtual std::vector<double> get_transformed_calibration_parameter_variances() const
-
inline virtual std::string name() const
Get the model’s name.
- Returns:
A string representing the name of the model.
-
inline virtual std::vector<std::string> get_parameter_names() const
Get the names of the model parameters.
Default implementation assigns names as “p1”, “p2”, etc.
- Returns:
A vector of parameter names.
Protected Attributes
-
double _kappa
Mean reversion rate.
Determines the speed at which the process reverts to the long-term mean \( \theta \).
-
double _omega
Volatility coefficient.
Controls the magnitude of random fluctuations in the process, scaled by the square root of the current state.
-
double _v0
Current value of the CIR process.
Represents the instantaneous level of the time-change process at the current time. Must remain non-negative.
-
double _rho
Correlation coefficient (leverage parameter).
Measures the instantaneous correlation between the Brownian motion driving the CIR process and the Brownian motion driving the underlying asset or external process.
-
double _sigma
Long-term mean level.
The value toward which the CIR process tends to revert over time.
-
double _multiplier
-
inline LCIR(double Kappa, double Omega, double V0, double Rho, double Sigma)