Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
durationadjustedcmscoupontsrpricer.hpp
Go to the documentation of this file.
1/*
2 Copyright (C) 2021 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 durationadjustedcmscoupontsrpricer.hpp
20 \brief tsr coupon pricer for duration adjusted cms coupon
21*/
22
23#pragma once
24
26
27#include <ql/cashflows/couponpricer.hpp>
28#include <ql/indexes/swapindex.hpp>
29#include <ql/math/integrals/integral.hpp>
30#include <ql/termstructures/volatility/smilesection.hpp>
31#include <ql/termstructures/yieldtermstructure.hpp>
32
33namespace QuantExt {
34
35using namespace QuantLib;
36
37class DurationAdjustedCmsCoupon;
38
40public:
42 const Handle<SwaptionVolatilityStructure>& swaptionVol,
43 const QuantLib::ext::shared_ptr<AnnuityMappingBuilder>& annuityMappingBuilder, const Real lowerIntegrationBound = -0.3,
44 const Real upperIntegrationBound = 0.3,
45 const QuantLib::ext::shared_ptr<Integrator>& integrator = QuantLib::ext::shared_ptr<Integrator>());
46
47 Real swapletPrice() const override;
48 Rate swapletRate() const override;
49 Real capletPrice(Rate effectiveCap) const override;
50 Rate capletRate(Rate effectiveCap) const override;
51 Real floorletPrice(Rate effectiveFloor) const override;
52 Rate floorletRate(Rate effectiveFloor) const override;
53
54private:
55 void initialize(const FloatingRateCoupon& coupon) override;
56 Real optionletRate(Option::Type type, Real effectiveStrike) const;
57
58 QuantLib::ext::shared_ptr<AnnuityMappingBuilder> annuityMappingBuilder_;
60 QuantLib::ext::shared_ptr<Integrator> integrator_;
61
63 Date today_;
65 QuantLib::ext::shared_ptr<SmileSection> smileSection_;
66 QuantLib::ext::shared_ptr<AnnuityMapping> annuityMapping_;
67};
68
69} // namespace QuantExt
base class for annuity mapping functions used in TSR models
QuantLib::ext::shared_ptr< SmileSection > smileSection_
Real optionletRate(Option::Type type, Real effectiveStrike) const
void initialize(const FloatingRateCoupon &coupon) override
QuantLib::ext::shared_ptr< AnnuityMappingBuilder > annuityMappingBuilder_
QuantLib::ext::shared_ptr< AnnuityMapping > annuityMapping_