Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
dynamicoptionletvolatilitystructure.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/termstructures/dynamicoptionletvolatilitystructure.hpp
20 \brief dynamic optionlet volatility structure
21 \ingroup termstructures
22*/
23
24#pragma once
25
27
28#include <ql/termstructures/volatility/optionlet/optionletvolatilitystructure.hpp>
29
30#include <boost/make_shared.hpp>
31
32namespace QuantExt {
33using namespace QuantLib;
34
35//! Converts OptionletVolatilityStructure with fixed reference date into a floating reference date term structure.
36/*! Different ways of reacting to time decay can be specified.
37
38 \warning No checks are performed that the supplied OptionletVolatilityStructure has a fixed reference date
39
40 \ingroup termstructures
41*/
42
43class DynamicOptionletVolatilityStructure : public OptionletVolatilityStructure {
44public:
45 DynamicOptionletVolatilityStructure(const QuantLib::ext::shared_ptr<OptionletVolatilityStructure>& source,
46 Natural settlementDays, const Calendar& calendar,
48
49protected:
50 //! \name OptionletVolatilityStructure interface
51 //@{
52 QuantLib::ext::shared_ptr<SmileSection> smileSectionImpl(Time optionTime) const override;
53 Volatility volatilityImpl(Time optionTime, Rate strike) const override;
54 //@}
55
56 //! \name VolatilityTermStructure interface
57 //@{
58 Rate minStrike() const override;
59 Rate maxStrike() const override;
60 //@}
61
62 //! \name VolatilityTermStructure interface
63 //@{
64 Date maxDate() const override;
65 //@}
66
67 //! \name Observer interface
68 //@{
69 void update() override;
70 //@}
71
72 //! Override the default implementations in OptionletVolatilityStructure
73 VolatilityType volatilityType() const override;
74 Real displacement() const override;
75
76private:
77 const QuantLib::ext::shared_ptr<OptionletVolatilityStructure> source_;
80 const VolatilityType volatilityType_;
81 const Real displacement_;
82};
83
85
87} // namespace QuantExt
Converts OptionletVolatilityStructure with fixed reference date into a floating reference date term s...
const QuantLib::ext::shared_ptr< OptionletVolatilityStructure > source_
Volatility volatilityImpl(Time optionTime, Rate strike) const override
VolatilityType volatilityType() const override
Override the default implementations in OptionletVolatilityStructure.
QuantLib::ext::shared_ptr< SmileSection > smileSectionImpl(Time optionTime) const override
dynamics type definitions
ReactionToTimeDecay
Reaction to Time Decay.
@ ConstantVariance