28 : x0_(x0), level_(level), speed_(
std::move(
speed)), volatility_(
std::move(vol)) {
65 return 0.5*vol*vol/
speed*(1.0 - std::exp(-2.0*
speed*dt));
ext::function< Real(Time)> speed_
Real diffusion(Time t, Real x) const override
returns the diffusion part of the equation, i.e.
ext::function< Real(Time)> volatility_
Real stdDeviation(Time t0, Real x0, Time dt) const override
Real volatility(Time t) const
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
GeneralizedOrnsteinUhlenbeckProcess(ext::function< Real(Time)> speed, ext::function< Real(Time)> vol, Real x0=0.0, Real level=0.0)
Real x0() const override
returns the initial value of the state variable
Real variance(Time t0, Real x0, Time dt) const override
#define QL_REQUIRE(condition, message)
throw an error if the given pre-condition is not verified
LinearInterpolation variance
Ornstein-Uhlenbeck process with piecewise linear coefficients.
Real Time
continuous quantity with 1-year units
Real Volatility
volatility