Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
analyticeuropeanenginedeltagamma.hpp
Go to the documentation of this file.
1/*
2 Copyright (C) 2016 Quaternion Risk Management Ltd
3 All rights reserved.
4
5 This file is part of ORE, a free-software/open-source library
6 for transparent pricing and risk analysis - http://opensourcerisk.org
7
8 ORE is free software: you can redistribute it and/or modify it
9 under the terms of the Modified BSD License. You should have received a
10 copy of the license along with this program.
11 The license is also available online at <http://opensourcerisk.org>
12
13 This program is distributed on the basis that it will form a useful
14 contribution to risk analytics and model standardisation, but WITHOUT
15 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
16 FITNESS FOR A PARTICULAR PURPOSE. See the license for more details.
17*/
18
19/*! \file qle/pricingengines/analyticeuropeanenginedeltagamma.hpp
20 \brief Analytic European engine providing sensitivities
21*/
22
23#ifndef quantext_analytic_european_engine_deltagamma_hpp
24#define quantext_analytic_european_engine_deltagamma_hpp
25
26#include <ql/instruments/vanillaoption.hpp>
27#include <ql/processes/blackscholesprocess.hpp>
28
29namespace QuantExt {
30using namespace QuantLib;
31
32//! Pricing engine for European vanilla options using analytical formulae
33/*! The additional results of this engine are
34
35 deltaSpot (Real ): Delta w.r.t. spot
36 gammaSpot (Real ): Gamma w.r.t. spot
37 vega (vector<Real> ): Bucketed vega
38
39 deltaRate (vector<Real> ): Bucketed delta on risk free curve
40 deltaDividend (vector<Real> ): Bucketed delta on dividend curve
41 gamma (Matrix ): Gamma matrix with blocks | rate-rate rate-div |
42 | rate-dic div-div |
43 gammaSpotRate (vecor<Real> ): Mixed derivatives w.r.t. spot and rate
44 gammaSpotDiv (vecor<Real> ): Mixed derivatives w.r.t. spot and div
45
46 theta (Real ): Theta (TODO...)
47
48 bucketTimesDeltaGamma (vector<Real> ): Bucketing grid for rate and dividend deltas and gammas
49 bucketTimesVega (vector<Real> ): Bucketing grid for vega
50*/
51
53public:
54 AnalyticEuropeanEngineDeltaGamma(const QuantLib::ext::shared_ptr<GeneralizedBlackScholesProcess>& process,
55 const std::vector<Time>& bucketTimeDeltaGamma = std::vector<Time>(),
56 const std::vector<Time>& bucketTimesVega = std::vector<Time>(),
57 const bool computeDeltaVega = false, const bool computeGamma = false,
58 const bool linearInZero = true);
59 void calculate() const override;
60
61private:
62 QuantLib::ext::shared_ptr<GeneralizedBlackScholesProcess> process_;
63 const std::vector<Time> bucketTimesDeltaGamma_, bucketTimesVega_;
65};
66} // namespace QuantExt
67
68#endif
Pricing engine for European vanilla options using analytical formulae.
QuantLib::ext::shared_ptr< GeneralizedBlackScholesProcess > process_