43 Real f_prime = (fup-
f)/shift;
44 alpha_drift +=
a_*
f+f_prime;
45 return process_->drift(
t, x) + alpha_drift;
99 Real f_prime = (fup-
f)/shift;
100 alpha_drift +=
a_*
f+f_prime;
112 -
M_T(t0, t0+dt,
T_);
140 return coeff*(1-exp1)-0.5*coeff*(exp2-exp3);
144 return coeff*(
t-
s)*(2.0*
T-
t-
s);
Shared handle to an observable.
Handle< YieldTermStructure > h_
HullWhiteForwardProcess(const Handle< YieldTermStructure > &h, Real a, Real sigma)
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 M_T(Real s, Real t, Real T) const
Real drift(Time t, Real x) const override
returns the drift part of the equation, i.e.
ext::shared_ptr< QuantLib::OrnsteinUhlenbeckProcess > process_
Real expectation(Time t0, Real x0, Time dt) const override
Real B(Time t, Time T) const
Real x0() const override
returns the initial value of the state variable
Real variance(Time t0, Real x0, Time dt) const override
Handle< YieldTermStructure > h_
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 drift(Time t, Real x) const override
returns the drift part of the equation, i.e.
ext::shared_ptr< QuantLib::OrnsteinUhlenbeckProcess > process_
HullWhiteProcess(const Handle< YieldTermStructure > &h, Real a, Real sigma)
Real expectation(Time t0, Real x0, Time dt) const override
Real x0() const override
returns the initial value of the state variable
Real variance(Time t0, Real x0, Time dt) const override
Ornstein-Uhlenbeck process class.
#define QL_REQUIRE(condition, message)
throw an error if the given pre-condition is not verified
@ NoFrequency
null frequency
Real Time
continuous quantity with 1-year units
Hull-White stochastic processes.