Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
proxyoptionletvolatility.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/proxyoptionletvolatility.hpp
20 \brief moneyness-adjusted optionlet vol for normal vols
21 \ingroup termstructures
22*/
23
24#pragma once
25
26#include <ql/termstructures/volatility/optionlet/optionletvolatilitystructure.hpp>
27
28namespace QuantExt {
29
30class ProxyOptionletVolatility : public QuantLib::OptionletVolatilityStructure {
31public:
32 ProxyOptionletVolatility(const QuantLib::Handle<OptionletVolatilityStructure>& baseVol,
33 const QuantLib::ext::shared_ptr<QuantLib::IborIndex>& baseIndex,
34 const QuantLib::ext::shared_ptr<QuantLib::IborIndex>& targetIndex,
35 const QuantLib::Period& baseRateComputationPeriod = 0 * QuantLib::Days,
36 const QuantLib::Period& targetRateComputationPeriod = 0 * QuantLib::Days);
37
38 QuantLib::Rate minStrike() const override { return baseVol_->minStrike(); }
39 QuantLib::Rate maxStrike() const override { return baseVol_->maxStrike(); }
40 QuantLib::Date maxDate() const override { return baseVol_->maxDate(); }
41 const QuantLib::Date& referenceDate() const override { return baseVol_->referenceDate(); }
42 VolatilityType volatilityType() const override { return baseVol_->volatilityType(); }
43 Real displacement() const override { return baseVol_->displacement(); }
44 Calendar calendar() const override { return baseVol_->calendar(); }
45
46private:
47 QuantLib::ext::shared_ptr<QuantLib::SmileSection> smileSectionImpl(const QuantLib::Date& optionDate) const override;
48 QuantLib::ext::shared_ptr<QuantLib::SmileSection> smileSectionImpl(QuantLib::Time optionTime) const override;
49 QuantLib::Volatility volatilityImpl(QuantLib::Time optionTime, QuantLib::Rate strike) const override;
50
51 QuantLib::Handle<QuantLib::OptionletVolatilityStructure> baseVol_;
52 QuantLib::ext::shared_ptr<QuantLib::IborIndex> baseIndex_;
53 QuantLib::ext::shared_ptr<QuantLib::IborIndex> targetIndex_;
56};
57
58} // namespace QuantExt
QuantLib::ext::shared_ptr< QuantLib::IborIndex > baseIndex_
QuantLib::Handle< QuantLib::OptionletVolatilityStructure > baseVol_
QuantLib::Volatility volatilityImpl(QuantLib::Time optionTime, QuantLib::Rate strike) const override
VolatilityType volatilityType() const override
QuantLib::ext::shared_ptr< QuantLib::IborIndex > targetIndex_
QuantLib::Date maxDate() const override
QuantLib::ext::shared_ptr< QuantLib::SmileSection > smileSectionImpl(const QuantLib::Date &optionDate) const override
QuantLib::Rate minStrike() const override
QuantLib::Rate maxStrike() const override
const QuantLib::Date & referenceDate() const override