Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
constantcpivolatility.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/inflation/constantcpivolatility.hpp
20 \brief Constant CPI Volatility Surface
21 \ingroup engines
22*/
23#pragma once
24
26
27namespace QuantExt {
28
30public:
31
32 ConstantCPIVolatility(QuantLib::Volatility v, QuantLib::Natural settlementDays, const QuantLib::Calendar&,
33 QuantLib::BusinessDayConvention bdc, const QuantLib::DayCounter& dc,
34 const QuantLib::Period& observationLag, QuantLib::Frequency frequency,
35 bool indexIsInterpolated, const QuantLib::Date& capFloorStartDate = QuantLib::Date(),
36 QuantLib::VolatilityType volType = QuantLib::ShiftedLognormal, double displacement = 0.0);
37
38 QuantLib::Date maxDate() const override { return QuantLib::Date::maxDate(); }
39
40 QuantLib::Real minStrike() const override { return QL_MIN_REAL; }
41
42 QuantLib::Real maxStrike() const override { return QL_MAX_REAL; }
43
44 QuantLib::Real atmStrike(const QuantLib::Date& maturity,
45 const QuantLib::Period& obsLag = QuantLib::Period(-1, QuantLib::Days)) const override;
46
47private:
48 virtual QuantLib::Volatility volatilityImpl(QuantLib::Time length, QuantLib::Rate strike) const override;
50};
51
52} // namespace QuantExt
double displacement() const
Returns the displacement for lognormal volatilities.
QuantLib::Date capFloorStartDate() const
QuantLib::Real minStrike() const override
QuantLib::Real maxStrike() const override
QuantLib::Date maxDate() const override
QuantLib::Real atmStrike(const QuantLib::Date &maturity, const QuantLib::Period &obsLag=QuantLib::Period(-1, QuantLib::Days)) const override
virtual QuantLib::Volatility volatilityImpl(QuantLib::Time length, QuantLib::Rate strike) const override
interpolated correlation term structure