QuantLib
: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
ql
pricingengines
vanilla
jumpdiffusionengine.hpp
Go to the documentation of this file.
1
/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
3
/*
4
Copyright (C) 2004 Ferdinando Ametrano
5
Copyright (C) 2007 StatPro Italia srl
6
7
This file is part of QuantLib, a free-software/open-source library
8
for financial quantitative analysts and developers - http://quantlib.org/
9
10
QuantLib is free software: you can redistribute it and/or modify it
11
under the terms of the QuantLib license. You should have received a
12
copy of the license along with this program; if not, please email
13
<quantlib-dev@lists.sf.net>. The license is also available online at
14
<http://quantlib.org/license.shtml>.
15
16
This program is distributed in the hope that it will be useful, but WITHOUT
17
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
18
FOR A PARTICULAR PURPOSE. See the license for more details.
19
*/
20
21
/*! \file jumpdiffusionengine.hpp
22
\brief Jump diffusion (Merton 1976) engine
23
*/
24
25
#ifndef quantlib_jumpdiffusionengine_h
26
#define quantlib_jumpdiffusionengine_h
27
28
#include <
ql/instruments/vanillaoption.hpp
>
29
#include <
ql/processes/merton76process.hpp
>
30
31
namespace
QuantLib
{
32
33
//! Jump-diffusion engine for vanilla options
34
/*! \ingroup vanillaengines
35
36
\test
37
- the correctness of the returned value is tested by
38
reproducing results available in literature.
39
- the correctness of the returned greeks is tested by
40
reproducing numerical derivatives.
41
*/
42
class
JumpDiffusionEngine
:
public
VanillaOption::engine
{
43
public
:
44
JumpDiffusionEngine
(ext::shared_ptr<Merton76Process>,
45
Real
relativeAccuracy_
= 1e-4,
46
Size
maxIterations = 100);
47
void
calculate
()
const override
;
48
49
private
:
50
ext::shared_ptr<Merton76Process>
process_
;
51
Real
relativeAccuracy_
;
52
Size
maxIterations_
;
53
};
54
55
}
56
57
58
59
60
61
#endif
QuantLib::JumpDiffusionEngine
Jump-diffusion engine for vanilla options.
Definition:
jumpdiffusionengine.hpp:42
QuantLib::JumpDiffusionEngine::relativeAccuracy_
Real relativeAccuracy_
Definition:
jumpdiffusionengine.hpp:51
QuantLib::JumpDiffusionEngine::calculate
void calculate() const override
Definition:
jumpdiffusionengine.cpp:41
QuantLib::JumpDiffusionEngine::process_
ext::shared_ptr< Merton76Process > process_
Definition:
jumpdiffusionengine.hpp:50
QuantLib::JumpDiffusionEngine::maxIterations_
Size maxIterations_
Definition:
jumpdiffusionengine.hpp:52
QuantLib::OneAssetOption::engine
Definition:
oneassetoption.hpp:82
QuantLib::Real
QL_REAL Real
real number
Definition:
types.hpp:50
QuantLib::Size
std::size_t Size
size of a container
Definition:
types.hpp:58
merton76process.hpp
Merton-76 process.
QuantLib
Definition:
any.hpp:35
vanillaoption.hpp
Vanilla option on a single asset.
Generated by
Doxygen
1.9.5