QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
variancegammaprocess.hpp
Go to the documentation of this file.
1/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
3/*
4Copyright (C) 2010 Adrian O' Neill
5
6This file is part of QuantLib, a free-software/open-source library
7for financial quantitative analysts and developers - http://quantlib.org/
8
9QuantLib is free software: you can redistribute it and/or modify it
10under the terms of the QuantLib license. You should have received a
11copy 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
15This program is distributed in the hope that it will be useful, but WITHOUT
16ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17FOR A PARTICULAR PURPOSE. See the license for more details.
18*/
19
20/*! \file variancegammaprocess.hpp
21 \brief Variance Gamma stochastic process
22*/
23
24#ifndef quantlib_variance_gamma_process_hpp
25#define quantlib_variance_gamma_process_hpp
26
29#include <ql/quote.hpp>
30
31namespace QuantLib {
32
33 //! Variance gamma process
34
35 /*! This class describes the stochastic volatility
36 process. With a Brownian motion given by
37 \f[
38 db = \theta dt + \sigma dW_t
39 \f]
40 then a Variance Gamma process X is defined by evaluating this
41 Brownian motion at sample times driven by a Gamma process. If T is
42 the value of a Gamma process with mean 1 and variance rate \f$ \nu
43 \f$ then the Variance Gamma process is given by
44 \f[
45 X(t) = B(T)
46 \f]
47
48 \ingroup processes
49 */
51 public:
55 Real sigma,
56 Real nu,
57 Real theta);
58
59 Real x0() const override;
60 Real drift(Time t, Real x) const override;
61 Real diffusion(Time t, Real x) const override;
62
63 Real sigma() const { return sigma_; }
64 Real nu() const { return nu_; }
65 Real theta() const { return theta_; }
66
67 const Handle<Quote>& s0() const;
70
71 private:
75 };
76
77}
78
79
80#endif
81
Shared handle to an observable.
Definition: handle.hpp:41
1-dimensional stochastic process
const Handle< YieldTermStructure > & dividendYield() const
Real diffusion(Time t, Real x) const override
returns the diffusion part of the equation, i.e.
Real drift(Time t, Real x) const override
returns the drift part of the equation, i.e.
Handle< YieldTermStructure > dividendYield_
Real x0() const override
returns the initial value of the state variable
const Handle< Quote > & s0() const
const Handle< YieldTermStructure > & riskFreeRate() const
Handle< YieldTermStructure > riskFreeRate_
const DefaultType & t
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
purely virtual base class for market observables
stochastic processes
Interest-rate term structure.