QuantLib: a free/open-source library for quantitative finance
Fully annotated sources - version 1.32
Loading...
Searching...
No Matches
merton76process.cpp
1/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
3/*
4 Copyright (C) 2003 Ferdinando Ametrano
5 Copyright (C) 2001, 2002, 2003 Sadruddin Rejeb
6 Copyright (C) 2004, 2005 StatPro Italia srl
7
8 This file is part of QuantLib, a free-software/open-source library
9 for financial quantitative analysts and developers - http://quantlib.org/
10
11 QuantLib is free software: you can redistribute it and/or modify it
12 under the terms of the QuantLib license. You should have received a
13 copy of the license along with this program; if not, please email
14 <quantlib-dev@lists.sf.net>. The license is also available online at
15 <http://quantlib.org/license.shtml>.
16
17 This program is distributed in the hope that it will be useful, but WITHOUT
18 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
19 FOR A PARTICULAR PURPOSE. See the license for more details.
20*/
21
22#include <ql/processes/merton76process.hpp>
23#include <utility>
24
25namespace QuantLib {
26
28 const Handle<YieldTermStructure>& dividendTS,
29 const Handle<YieldTermStructure>& riskFreeTS,
30 const Handle<BlackVolTermStructure>& blackVolTS,
31 Handle<Quote> jumpInt,
32 Handle<Quote> logJMean,
33 Handle<Quote> logJVol,
34 const ext::shared_ptr<discretization>& disc)
35 : StochasticProcess1D(disc), blackProcess_(
36 new BlackScholesMertonProcess(stateVariable, dividendTS, riskFreeTS, blackVolTS, disc)),
37 jumpIntensity_(std::move(jumpInt)), logMeanJump_(std::move(logJMean)),
38 logJumpVolatility_(std::move(logJVol)) {
43 }
44
46 return blackProcess_->x0();
47 }
48
50 return blackProcess_->time(d);
51 }
52
54 return blackProcess_->stateVariable();
55 }
56
58 return blackProcess_->dividendYield();
59 }
60
62 return blackProcess_->riskFreeRate();
63 }
64
67 return blackProcess_->blackVolatility();
68 }
69
71 return jumpIntensity_;
72 }
73
75 return logMeanJump_;
76 }
77
79 return logJumpVolatility_;
80 }
81
82}
Merton (1973) extension to the Black-Scholes stochastic process.
Concrete date class.
Definition: date.hpp:125
Shared handle to an observable.
Definition: handle.hpp:41
const Handle< Quote > & jumpIntensity() const
const Handle< Quote > & logJumpVolatility() const
const Handle< Quote > & stateVariable() const
Handle< Quote > logJumpVolatility_
Merton76Process(const Handle< Quote > &stateVariable, const Handle< YieldTermStructure > &dividendTS, const Handle< YieldTermStructure > &riskFreeTS, const Handle< BlackVolTermStructure > &blackVolTS, Handle< Quote > jumpInt, Handle< Quote > logJMean, Handle< Quote > logJVol, const ext::shared_ptr< discretization > &d=ext::shared_ptr< discretization >(new EulerDiscretization))
const Handle< YieldTermStructure > & dividendYield() const
Time time(const Date &) const override
ext::shared_ptr< GeneralizedBlackScholesProcess > blackProcess_
const Handle< Quote > & logMeanJump() const
Handle< Quote > jumpIntensity_
const Handle< BlackVolTermStructure > & blackVolatility() const
Real x0() const override
returns the initial value of the state variable
const Handle< YieldTermStructure > & riskFreeRate() const
std::pair< iterator, bool > registerWith(const ext::shared_ptr< Observable > &)
Definition: observable.hpp:228
1-dimensional stochastic process
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
STL namespace.