26#ifndef quantlib_stochastic_process_hpp
27#define quantlib_stochastic_process_hpp
74 const Array& x)
const = 0;
79 const Array& x)
const = 0;
126 const Array& dw)
const;
131 const Array& dx)
const;
255 #if defined(QL_EXTRA_SAFETY_CHECKS)
263 #if defined(QL_EXTRA_SAFETY_CHECKS)
272 #if defined(QL_EXTRA_SAFETY_CHECKS)
281 #if defined(QL_EXTRA_SAFETY_CHECKS)
290 #if defined(QL_EXTRA_SAFETY_CHECKS)
299 #if defined(QL_EXTRA_SAFETY_CHECKS)
308 const Array& dx)
const {
309 #if defined(QL_EXTRA_SAFETY_CHECKS)
1-D array used in linear algebra.
Size size() const
dimension of the array
Matrix used in linear algebra.
Object that notifies its changes to a set of observers.
Object that gets notified when a given observable changes.
discretization of a 1-D stochastic process
virtual Real diffusion(const StochasticProcess1D &, Time t0, Real x0, Time dt) const =0
virtual Real variance(const StochasticProcess1D &, Time t0, Real x0, Time dt) const =0
virtual ~discretization()=default
virtual Real drift(const StochasticProcess1D &, Time t0, Real x0, Time dt) const =0
1-dimensional stochastic process
virtual Real apply(Real x0, Real dx) const
Size size() const override
returns the number of dimensions of the stochastic process
ext::shared_ptr< discretization > discretization_
virtual Real drift(Time t, Real x) const =0
returns the drift part of the equation, i.e.
Matrix covariance(Time t0, const Array &x0, Time dt) const override
virtual Real evolve(Time t0, Real x0, Time dt, Real dw) const
StochasticProcess1D()=default
Array initialValues() const override
returns the initial values of the state variables
virtual Real x0() const =0
returns the initial value of the state variable
virtual Real stdDeviation(Time t0, Real x0, Time dt) const
virtual Real expectation(Time t0, Real x0, Time dt) const
virtual Real diffusion(Time t, Real x) const =0
returns the diffusion part of the equation, i.e.
discretization of a stochastic process over a given time interval
virtual Matrix covariance(const StochasticProcess &, Time t0, const Array &x0, Time dt) const =0
virtual Matrix diffusion(const StochasticProcess &, Time t0, const Array &x0, Time dt) const =0
virtual ~discretization()=default
virtual Array drift(const StochasticProcess &, Time t0, const Array &x0, Time dt) const =0
multi-dimensional stochastic process class.
virtual Size size() const =0
returns the number of dimensions of the stochastic process
~StochasticProcess() override=default
virtual Matrix stdDeviation(Time t0, const Array &x0, Time dt) const
virtual Array drift(Time t, const Array &x) const =0
returns the drift part of the equation, i.e.,
virtual Array evolve(Time t0, const Array &x0, Time dt, const Array &dw) const
virtual Matrix covariance(Time t0, const Array &x0, Time dt) const
ext::shared_ptr< discretization > discretization_
virtual Array apply(const Array &x0, const Array &dx) const
virtual Array expectation(Time t0, const Array &x0, Time dt) const
virtual Size factors() const
returns the number of independent factors of the process
virtual Matrix diffusion(Time t, const Array &x) const =0
returns the diffusion part of the equation, i.e.
virtual Time time(const Date &) const
StochasticProcess()=default
virtual Array initialValues() const =0
returns the initial values of the state variables
date- and time-related classes, typedefs and enumerations
#define QL_REQUIRE(condition, message)
throw an error if the given pre-condition is not verified
LinearInterpolation variance
Real Time
continuous quantity with 1-year units
std::size_t Size
size of a container
matrix used in linear algebra.
observer/observable pattern