Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
parametricvolatilitysmilesection.hpp
Go to the documentation of this file.
1/*
2 Copyright (C) 2024 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 paramtricvolatilitysmilesection.hpp
20 \brief smile section based on parametric volatility
21 \ingroup termstructures
22*/
23
24#ifndef quantext_parametric_volatility_smile_section_h
25#define quantext_parametric_volatility_smile_section_h
26
28
29#include <ql/termstructures/volatility/smilesection.hpp>
30
31namespace QuantExt {
32using namespace QuantLib;
33
34class ParametricVolatilitySmileSection : public QuantLib::SmileSection {
35public:
36 ParametricVolatilitySmileSection(const Real optionTime, const Real swapLength, const Real atmLevel,
37 const boost::shared_ptr<ParametricVolatility> parametricVolatility,
38 const ParametricVolatility::MarketQuoteType outputMarketQuoteType);
39 Real minStrike() const override { return -QL_MAX_REAL; }
40 Real maxStrike() const override { return QL_MAX_REAL; }
41 Real atmLevel() const override;
42
43private:
44 Volatility volatilityImpl(Rate strike) const override;
46 boost::shared_ptr<ParametricVolatility> parametricVolatility_;
48 mutable std::map<Real, Real> cache_;
49};
50
51} // namespace QuantExt
52
53#endif
ParametricVolatility::MarketQuoteType outputMarketQuoteType_
boost::shared_ptr< ParametricVolatility > parametricVolatility_
Volatility volatilityImpl(Rate strike) const override
cross-asset, generic volatility structure