Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
fxvannavolgasmilesection.hpp
Go to the documentation of this file.
1/*
2 Copyright (C) 2017 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 fxvannavolgasmilesection.hpp
20 \brief FX smile section assuming a strike/volatility space using vanna volga method
21 \ingroup termstructures
22*/
23
24#ifndef quantext_fx_vanna_volga_smile_section_hpp
25#define quantext_fx_vanna_volga_smile_section_hpp
26
27#include <ql/experimental/barrieroption/vannavolgainterpolation.hpp>
28#include <ql/experimental/fx/blackdeltacalculator.hpp>
30
31namespace QuantExt {
32using namespace QuantLib;
33
34/*! Vanna Volga Smile section
35 *
36 * Consistent Pricing of FX Options
37 * Castagna & Mercurio (2006)
38 * http://papers.ssrn.com/sol3/papers.cfm?abstract_id=873788
39 \ingroup termstructures
40 */
42public:
43 VannaVolgaSmileSection(Real spot, Real rd, Real rf, Time t, Volatility atmVol, Volatility rr, Volatility bf,
44 bool firstApprox = false,
45 const DeltaVolQuote::AtmType& atmType = DeltaVolQuote::AtmType::AtmDeltaNeutral,
46 const DeltaVolQuote::DeltaType& deltaType = DeltaVolQuote::DeltaType::Spot,
47 const Real delta = 0.25);
48
49 //! getters for unit test
50 Real k_atm() const { return k_atm_; }
51 Real k_c() const { return k_c_; }
52 Real k_p() const { return k_p_; }
53 Volatility vol_atm() const { return atmVol_; }
54 Volatility vol_c() const { return vol_c_; }
55 Volatility vol_p() const { return vol_p_; }
56
57 //! \name FxSmileSection interface
58 //@{
59 Volatility volatility(Real strike) const override;
60 //}@
61
62private:
63 Real d1(Real x) const;
64 Real d2(Real x) const;
65
67 Volatility atmVol_, rr_, bf_;
68 Volatility vol_c_, vol_p_;
70};
71
72} // namespace QuantExt
73
74#endif
Volatility volatility(Real strike) const override
Real k_atm() const
getters for unit test
FX smile section assuming a strike/volatility space.