QuantLib: a free/open-source library for quantitative finance
Fully annotated sources - version 1.32
Loading...
Searching...
No Matches
gemanroncoroniprocess.hpp
1/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
3/*
4 Copyright (C) 2011 Klaus Spanderen
5
6 This file is part of QuantLib, a free-software/open-source library
7 for financial quantitative analysts and developers - http://quantlib.org/
8
9 QuantLib is free software: you can redistribute it and/or modify it
10 under the terms of the QuantLib license. You should have received a
11 copy of the license along with this program; if not, please email
12 <quantlib-dev@lists.sf.net>. The license is also available online at
13 <http://quantlib.org/license.shtml>.
14
15 This program is distributed in the hope that it will be useful, but WITHOUT
16 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 FOR A PARTICULAR PURPOSE. See the license for more details.
18*/
19
24#ifndef quantlib_geman_roncoroni_process_hpp
25#define quantlib_geman_roncoroni_process_hpp
26
27#include <ql/stochasticprocess.hpp>
28#include <ql/math/randomnumbers/rngtraits.hpp>
29
30namespace QuantLib {
31
33
47 public:
49 Real alpha, Real beta,
50 Real gamma, Real delta,
51 Real eps, Real zeta, Real d,
52 Real k, Real tau,
53 Real sig2, Real a, Real b,
54 Real theta1, Real theta2, Real theta3,
55 Real psi);
56
57 Real x0() const override;
58 Real drift(Time t, Real x) const override;
59 Real diffusion(Time t, Real x) const override;
60 Real stdDeviation(Time t0, Real x0, Time dt) const override;
61 Real evolve(Time t0, Real x0, Time dt, Real dw) const override;
62
63 Real evolve(Time t0, Real x0, Time dt, Real dw, const Array& du) const;
64
65 private:
66 // avoid clang++ warnings
68
69 const Real x0_;
71 const Real eps_, zeta_, d_;
72 const Real k_, tau_;
73 const Real sig2_, a_, b_;
75 const Real psi_;
76 mutable ext::shared_ptr<PseudoRandom::urng_type> urng_;
77 };
78}
79
80
81#endif
1-D array used in linear algebra.
Definition: array.hpp:52
Geman-Roncoroni process class.
Real diffusion(Time t, Real x) const override
returns the diffusion part of the equation, i.e.
ext::shared_ptr< PseudoRandom::urng_type > urng_
Real stdDeviation(Time t0, Real x0, Time dt) const override
Real evolve(Time t0, Real x0, Time dt, Real dw) const override
Real drift(Time t, Real x) const override
returns the drift part of the equation, i.e.
Real x0() const override
returns the initial value of the state variable
1-dimensional stochastic process
virtual Array evolve(Time t0, const Array &x0, Time dt, const Array &dw) const
Real Time
continuous quantity with 1-year units
Definition: types.hpp:62
QL_REAL Real
real number
Definition: types.hpp:50
Definition: any.hpp:35