25#ifndef quantlib_coxingersollross_process_hpp
26#define quantlib_coxingersollross_process_hpp
66 Real dw)
const override;
119 const Real psi = s2/(m*m);
122 const Real b2 = 2/psi-1+std::sqrt(2/psi*(2/psi-1));
123 const Real b = std::sqrt(b2);
124 const Real a = m/(1+b2);
126 result = a*(
b+dw)*(
b+dw);
129 const Real p = (psi-1)/(psi+1);
134 result = ((u <= p) ? 0.0 :
Real(std::log((1-p)/(1-u))/
beta));
CoxIngersollRoss process class.
Real diffusion(Time t, Real x) const override
returns the diffusion part of the equation, i.e.
Real stdDeviation(Time t0, Real x0, Time dt) const override
Real evolve(Time t0, Real x0, Time dt, Real dw) const override
Real drift(Time t, Real x) const override
returns the drift part of the equation, i.e.
Real expectation(Time t0, Real x0, Time dt) const override
Real x0() const override
returns the initial value of the state variable
Cumulative normal distribution function.
1-dimensional stochastic process
ext::function< Real(Real)> b
LinearInterpolation variance
Real Time
continuous quantity with 1-year units
Real Volatility
volatility
normal, cumulative and inverse cumulative distributions