35 return b(x) * std::exp(speed*x);
89 +
b_(t0+0.5*dt)*(1.0 - std::exp(-
speed_*dt));
100 + bt-ex*bu - (bt-bu)/(
speed_*dt)*(1-ex);
110 QL_FAIL(
"unknown discretization scheme");
ext::shared_ptr< SimpleQuote > vol_
ExtendedOrnsteinUhlenbeckProcess(Real speed, Volatility sigma, Real x0, ext::function< Real(Real)> b, Discretization discretization=MidPoint, Real intEps=1e-4)
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
const ext::shared_ptr< OrnsteinUhlenbeckProcess > ouProcess_
const ext::function< Real(Real)> b_
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
const Discretization discretization_
Real x0() const override
returns the initial value of the state variable
Real variance(Time t0, Real x0, Time dt) const override
Integral of a one-dimensional function.
Ornstein-Uhlenbeck process class.
discretization of a stochastic process over a given time interval
#define QL_REQUIRE(condition, message)
throw an error if the given pre-condition is not verified
#define QL_FAIL(message)
throw an error (possibly with file and line information)
ext::function< Real(Real)> b
extended Ornstein-Uhlenbeck process
integral of a one-dimensional function using the adaptive Gauss-Lobatto integral
Real Time
continuous quantity with 1-year units
Real Volatility
volatility
Ornstein-Uhlenbeck process.