QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.38
Loading...
Searching...
No Matches
operatorsplittingspreadengine.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) 2024 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 operatorsplittingspreadengine.hpp
21 \brief Analytic operator splitting approximation by Chi-Fai Lo (2015)
22*/
23
24#ifndef quantlib_operator_splitting_spread_engine_hpp
25#define quantlib_operator_splitting_spread_engine_hpp
26
28
29namespace QuantLib {
30
31 //! Pricing engine for spread options with two assets
32 /*! Chi-Fai Lo,
33 Pricing Spread Options by the Operator Splitting Method,
34 https://papers.ssrn.com/sol3/papers.cfm?abstract_id=2429696
35
36 \ingroup basketengines
37 */
39 public:
42 ext::shared_ptr<GeneralizedBlackScholesProcess> process1,
43 ext::shared_ptr<GeneralizedBlackScholesProcess> process2,
44 Real correlation,
45 Order order = Second);
46
47 protected:
48 Real calculate(Real f1, Real f2, Real strike, Option::Type optionType,
49 Real variance1, Real variance2, DiscountFactor df) const override;
50
52 };
53}
54
55
56#endif
Pricing engine for spread options with two assets.
QL_REAL Real
real number
Definition: types.hpp:50
Real DiscountFactor
discount factor between dates
Definition: types.hpp:66
Definition: any.hpp:37
base class for 2d spread pricing engines using the Black-Scholes model.