Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
qle
termstructures
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>
29
#include <
qle/termstructures/fxsmilesection.hpp
>
30
31
namespace
QuantExt
{
32
using 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
*/
41
class
VannaVolgaSmileSection
:
public
FxSmileSection
{
42
public
:
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
62
private
:
63
Real
d1
(Real x)
const
;
64
Real
d2
(Real x)
const
;
65
66
Real
k_atm_
,
k_c_
,
k_p_
;
67
Volatility
atmVol_
,
rr_
,
bf_
;
68
Volatility
vol_c_
,
vol_p_
;
69
bool
firstApprox_
;
70
};
71
72
}
// namespace QuantExt
73
74
#endif
QuantExt::FxSmileSection
Definition:
fxsmilesection.hpp:34
QuantExt::VannaVolgaSmileSection
Definition:
fxvannavolgasmilesection.hpp:41
QuantExt::VannaVolgaSmileSection::vol_atm
Volatility vol_atm() const
Definition:
fxvannavolgasmilesection.hpp:53
QuantExt::VannaVolgaSmileSection::vol_c_
Volatility vol_c_
Definition:
fxvannavolgasmilesection.hpp:68
QuantExt::VannaVolgaSmileSection::vol_p_
Volatility vol_p_
Definition:
fxvannavolgasmilesection.hpp:68
QuantExt::VannaVolgaSmileSection::atmVol_
Volatility atmVol_
Definition:
fxvannavolgasmilesection.hpp:67
QuantExt::VannaVolgaSmileSection::vol_c
Volatility vol_c() const
Definition:
fxvannavolgasmilesection.hpp:54
QuantExt::VannaVolgaSmileSection::d2
Real d2(Real x) const
Definition:
fxvannavolgasmilesection.cpp:76
QuantExt::VannaVolgaSmileSection::volatility
Volatility volatility(Real strike) const override
Definition:
fxvannavolgasmilesection.cpp:80
QuantExt::VannaVolgaSmileSection::k_atm
Real k_atm() const
getters for unit test
Definition:
fxvannavolgasmilesection.hpp:50
QuantExt::VannaVolgaSmileSection::k_p_
Real k_p_
Definition:
fxvannavolgasmilesection.hpp:66
QuantExt::VannaVolgaSmileSection::k_p
Real k_p() const
Definition:
fxvannavolgasmilesection.hpp:52
QuantExt::VannaVolgaSmileSection::k_atm_
Real k_atm_
Definition:
fxvannavolgasmilesection.hpp:66
QuantExt::VannaVolgaSmileSection::d1
Real d1(Real x) const
Definition:
fxvannavolgasmilesection.cpp:72
QuantExt::VannaVolgaSmileSection::k_c
Real k_c() const
Definition:
fxvannavolgasmilesection.hpp:51
QuantExt::VannaVolgaSmileSection::firstApprox_
bool firstApprox_
Definition:
fxvannavolgasmilesection.hpp:69
QuantExt::VannaVolgaSmileSection::bf_
Volatility bf_
Definition:
fxvannavolgasmilesection.hpp:67
QuantExt::VannaVolgaSmileSection::k_c_
Real k_c_
Definition:
fxvannavolgasmilesection.hpp:66
QuantExt::VannaVolgaSmileSection::rr_
Volatility rr_
Definition:
fxvannavolgasmilesection.hpp:67
QuantExt::VannaVolgaSmileSection::vol_p
Volatility vol_p() const
Definition:
fxvannavolgasmilesection.hpp:55
fxsmilesection.hpp
FX smile section assuming a strike/volatility space.
QuantExt
Definition:
namespaces.docs:19
QuantLib
Definition:
colombia.cpp:21
Generated by
Doxygen
1.9.5