24#include <ql/experimental/processes/extendedornsteinuhlenbeckprocess.hpp>
25#include <ql/experimental/processes/extouwithjumpsprocess.hpp>
31 ext::shared_ptr<ExtendedOrnsteinUhlenbeckProcess> process,
36 : Y0_(Y0), beta_(beta), jumpIntensity_(jumpIntensity), eta_(eta),
37 ouProcess_(
std::move(process)) {
38 QL_REQUIRE(
ouProcess_,
"null Ornstein/Uhlenbeck process");
47 ext::shared_ptr<ExtendedOrnsteinUhlenbeckProcess>
86 retVal[0] =
ouProcess_->evolve(t0, x0[0], dt, dw[0]);
87 retVal[1] = x0[1]*std::exp(-
beta_*dt);
93 if (interarrival < dt) {
96 const Real jumpSize = -1.0/
eta_*std::log(u2);
97 retVal[1] += jumpSize;
1-D array used in linear algebra.
const ext::shared_ptr< ExtendedOrnsteinUhlenbeckProcess > ouProcess_
Array drift(Time t, const Array &x) const override
returns the drift part of the equation, i.e.,
Size size() const override
returns the number of dimensions of the stochastic process
Array evolve(Time t0, const Array &x0, Time dt, const Array &dw) const override
ExtOUWithJumpsProcess(ext::shared_ptr< ExtendedOrnsteinUhlenbeckProcess > process, Real Y0, Real beta, Real jumpIntensity, Real eta)
ext::shared_ptr< ExtendedOrnsteinUhlenbeckProcess > getExtendedOrnsteinUhlenbeckProcess() const
Matrix diffusion(Time t, const Array &x) const override
returns the diffusion part of the equation, i.e.
Size factors() const override
returns the number of independent factors of the process
Array initialValues() const override
returns the initial values of the state variables
const Real jumpIntensity_
Real jumpIntensity() const
const CumulativeNormalDistribution cumNormalDist_
Matrix used in linear algebra.
Real Time
continuous quantity with 1-year units
std::size_t Size
size of a container