QuantLib
: a free/open-source library for quantitative finance
fully annotated source code - version 1.38
Loading...
Searching...
No Matches
ql
pricingengines
basket
kirkengine.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) 2010 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
20
/*! \file kirkengine.hpp
21
\brief kirk formulae, due to Kirk (1995)
22
*/
23
24
#ifndef quantlib_kirk_engine_hpp
25
#define quantlib_kirk_engine_hpp
26
27
#include <
ql/pricingengines/basket/spreadblackscholesvanillaengine.hpp
>
28
29
namespace
QuantLib
{
30
31
//! Pricing engine for spread option on two futures
32
/*! This class implements formulae from
33
"Correlation in the Energy Markets", E. Kirk
34
Managing Energy Price Risk.
35
London: Risk Publications and Enron, pp. 71-78
36
37
\ingroup basketengines
38
39
\test the correctness of the returned value is tested by
40
reproducing results available in literature.
41
*/
42
class
KirkEngine
:
public
SpreadBlackScholesVanillaEngine
{
43
public
:
44
KirkEngine
(ext::shared_ptr<GeneralizedBlackScholesProcess> process1,
45
ext::shared_ptr<GeneralizedBlackScholesProcess> process2,
46
Real
correlation);
47
48
protected
:
49
Real
calculate
(
Real
f1,
Real
f2,
Real
strike,
Option::Type
optionType,
50
Real
variance1,
Real
variance2,
DiscountFactor
df)
const override
;
51
};
52
}
53
54
55
#endif
QuantLib::KirkEngine
Pricing engine for spread option on two futures.
Definition:
kirkengine.hpp:42
QuantLib::Option::Type
Type
Definition:
option.hpp:39
QuantLib::SpreadBlackScholesVanillaEngine
Definition:
spreadblackscholesvanillaengine.hpp:32
QuantLib::SpreadBlackScholesVanillaEngine::calculate
void calculate() const override
Definition:
spreadblackscholesvanillaengine.cpp:36
QuantLib::Real
QL_REAL Real
real number
Definition:
types.hpp:50
QuantLib::DiscountFactor
Real DiscountFactor
discount factor between dates
Definition:
types.hpp:66
QuantLib
Definition:
any.hpp:37
spreadblackscholesvanillaengine.hpp
base class for 2d spread pricing engines using the Black-Scholes model.
Generated by
Doxygen
1.9.5