Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
proxyswaptionvolatility.hpp
Go to the documentation of this file.
1/*
2 Copyright (C) 2022 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/proxyswaptionvolatility.hpp
20 \brief moneyness-adjusted swaption vol for normal vols
21 \ingroup termstructures
22*/
23
24#pragma once
25
26#include <ql/indexes/swapindex.hpp>
27#include <ql/termstructures/volatility/swaption/swaptionvolstructure.hpp>
28
29namespace QuantExt {
30
31class ProxySwaptionVolatility : public QuantLib::SwaptionVolatilityStructure {
32public:
33 ProxySwaptionVolatility(const QuantLib::Handle<SwaptionVolatilityStructure>& baseVol,
34 QuantLib::ext::shared_ptr<QuantLib::SwapIndex> baseSwapIndexBase,
35 QuantLib::ext::shared_ptr<QuantLib::SwapIndex> baseShortSwapIndexBase,
36 QuantLib::ext::shared_ptr<QuantLib::SwapIndex> targetSwapIndexBase,
37 QuantLib::ext::shared_ptr<QuantLib::SwapIndex> targetShortSwapIndexBase);
38
39 QuantLib::Rate minStrike() const override { return baseVol_->minStrike(); }
40 QuantLib::Rate maxStrike() const override { return baseVol_->maxStrike(); }
41 QuantLib::Date maxDate() const override { return baseVol_->maxDate(); }
42 const QuantLib::Date& referenceDate() const override { return baseVol_->referenceDate(); }
43 QuantLib::VolatilityType volatilityType() const override { return baseVol_->volatilityType(); }
44 QuantLib::Calendar calendar() const override { return baseVol_->calendar(); }
45
46 const QuantLib::Period& maxSwapTenor() const override { return baseVol_->maxSwapTenor(); }
47
48private:
49 QuantLib::ext::shared_ptr<QuantLib::SmileSection> smileSectionImpl(const QuantLib::Date& optionDate,
50 const QuantLib::Period& swapTenor) const override;
51 QuantLib::ext::shared_ptr<QuantLib::SmileSection> smileSectionImpl(QuantLib::Time optionTime,
52 QuantLib::Time swapLength) const override;
53 QuantLib::Volatility volatilityImpl(QuantLib::Time optionTime, QuantLib::Time swapLength,
54 QuantLib::Rate strike) const override;
55
56 QuantLib::Handle<QuantLib::SwaptionVolatilityStructure> baseVol_;
57 QuantLib::ext::shared_ptr<QuantLib::SwapIndex> baseSwapIndexBase_;
58 QuantLib::ext::shared_ptr<QuantLib::SwapIndex> baseShortSwapIndexBase_;
59 QuantLib::ext::shared_ptr<QuantLib::SwapIndex> targetSwapIndexBase_;
60 QuantLib::ext::shared_ptr<QuantLib::SwapIndex> targetShortSwapIndexBase_;
61};
62
63} // namespace QuantExt
QuantLib::Calendar calendar() const override
QuantLib::Volatility volatilityImpl(QuantLib::Time optionTime, QuantLib::Time swapLength, QuantLib::Rate strike) const override
QuantLib::ext::shared_ptr< QuantLib::SwapIndex > baseSwapIndexBase_
QuantLib::VolatilityType volatilityType() const override
QuantLib::ext::shared_ptr< QuantLib::SmileSection > smileSectionImpl(QuantLib::Time optionTime, QuantLib::Time swapLength) const override
QuantLib::ext::shared_ptr< QuantLib::SmileSection > smileSectionImpl(const QuantLib::Date &optionDate, const QuantLib::Period &swapTenor) const override
QuantLib::Date maxDate() const override
QuantLib::Rate minStrike() const override
QuantLib::ext::shared_ptr< QuantLib::SwapIndex > baseShortSwapIndexBase_
QuantLib::Rate maxStrike() const override
QuantLib::Handle< QuantLib::SwaptionVolatilityStructure > baseVol_
QuantLib::ext::shared_ptr< QuantLib::SwapIndex > targetSwapIndexBase_
QuantLib::ext::shared_ptr< QuantLib::SwapIndex > targetShortSwapIndexBase_
const QuantLib::Date & referenceDate() const override
const QuantLib::Period & maxSwapTenor() const override