Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
dynamicswaptionvolmatrix.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 termstructures/dynamicswaptionvolmatrix.hpp
20 \brief dynamic swaption volatility matrix
21 \ingroup termstructures
22*/
23
24#ifndef quantext_dynamic_swaption_volatility_termstructure_hpp
25#define quantext_dynamic_swaption_volatility_termstructure_hpp
26
28
29#include <ql/termstructures/volatility/swaption/swaptionvolmatrix.hpp>
30
31#include <boost/make_shared.hpp>
32
33namespace QuantExt {
34using namespace QuantLib;
35//! Takes a SwaptionVolatilityMatrix with fixed reference date and turns it into a floating reference date term
36// structure.
37/*! This class takes a SwaptionVolatilityMatrix with fixed reference date and turns it into a floating reference date
38 term structure. There are different ways of reacting to time decay that can be specified.
39
40 \warning the vols from the source ts are read using strike null (indicating atm)
41
42 \ingroup termstructures
43*/
44
45class DynamicSwaptionVolatilityMatrix : public SwaptionVolatilityStructure {
46public:
47 DynamicSwaptionVolatilityMatrix(const QuantLib::ext::shared_ptr<SwaptionVolatilityStructure>& source,
48 Natural settlementDays, const Calendar& calendar,
50
51protected:
52 /* SwaptionVolatilityStructure interface */
53 const Period& maxSwapTenor() const override;
54
55 QuantLib::ext::shared_ptr<SmileSection> smileSectionImpl(Time optionTime, Time swapLength) const override;
56
57 Volatility volatilityImpl(Time optionTime, Time swapLength, Rate strike) const override;
58
59 Real shiftImpl(Time optionTime, Time swapLength) const override;
60
61 /* VolatilityTermStructure interface */
62 Real minStrike() const override;
63 Real maxStrike() const override;
64 /* TermStructure interface */
65 Date maxDate() const override;
66 /* Observer interface */
67 void update() override;
68
69 VolatilityType volatilityType() const override;
70
71private:
72 const QuantLib::ext::shared_ptr<SwaptionVolatilityStructure> source_;
75 VolatilityType volatilityType_;
76};
77
79
80} // namespace QuantExt
81
82#endif
Takes a SwaptionVolatilityMatrix with fixed reference date and turns it into a floating reference dat...
Volatility volatilityImpl(Time optionTime, Time swapLength, Rate strike) const override
QuantLib::ext::shared_ptr< SmileSection > smileSectionImpl(Time optionTime, Time swapLength) const override
Real shiftImpl(Time optionTime, Time swapLength) const override
const QuantLib::ext::shared_ptr< SwaptionVolatilityStructure > source_
dynamics type definitions
ReactionToTimeDecay
Reaction to Time Decay.
@ ConstantVariance