Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
analyticeuropeanforwardengine.hpp
Go to the documentation of this file.
1/*
2 Copyright (C) 2002, 2003, 2004 Ferdinando Ametrano
3 Copyright (C) 2002, 2003 RiskMap srl
4 Copyright (C) 2003, 2004, 2007 StatPro Italia srl
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/*
21 Copyright (C) 2020 Quaternion Risk Management Ltd
22 All rights reserved.
23
24 This file is part of ORE, a free-software/open-source library
25 for transparent pricing and risk analysis - http://opensourcerisk.org
26
27 ORE is free software: you can redistribute it and/or modify it
28 under the terms of the Modified BSD License. You should have received a
29 copy of the license along with this program.
30 The license is also available online at <http://opensourcerisk.org>
31
32 This program is distributed on the basis that it will form a useful
33 contribution to risk analytics and model standardisation, but WITHOUT
34 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
35 FITNESS FOR A PARTICULAR PURPOSE. See the license for more details.
36*/
37
38
39/*! \file analyticeuropeanforwardengine.hpp
40 \brief Analytic European Forward engine
41*/
42
43#ifndef quantext_analytic_european_forward_engine_hpp
44#define quantext_analytic_european_forward_engine_hpp
45
47#include <ql/processes/blackscholesprocess.hpp>
48
49namespace QuantExt {
50
51 //! Pricing engine for European vanilla forward options using analytical formulae
52 /*! \ingroup vanillaengines */
54 public:
55 /*! This constructor triggers the usual calculation, in which
56 the risk-free rate in the given process is used for both
57 forecasting and discounting.
58 */
60 const QuantLib::ext::shared_ptr<QuantLib::GeneralizedBlackScholesProcess>&);
61
62 /*! This constructor allows to use a different term structure
63 for discounting the payoff. As usual, the risk-free rate
64 from the given process is used for forecasting the forward
65 price.
66 */
68 const QuantLib::ext::shared_ptr<QuantLib::GeneralizedBlackScholesProcess>& process,
69 const QuantLib::Handle<QuantLib::YieldTermStructure>& discountCurve);
70 void calculate() const override;
71 private:
72 QuantLib::ext::shared_ptr<QuantLib::GeneralizedBlackScholesProcess> process_;
73 QuantLib::Handle<QuantLib::YieldTermStructure> discountCurve_;
74 };
75
76}
77
78
79#endif
Pricing engine for European vanilla forward options using analytical formulae.
QuantLib::ext::shared_ptr< QuantLib::GeneralizedBlackScholesProcess > process_
QuantLib::Handle< QuantLib::YieldTermStructure > discountCurve_
Vanilla forward option on a single asset.