Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
strippedcapflooredyoyinflationcoupon.hpp
Go to the documentation of this file.
1/*
2Copyright (C) 2019 Quaternion Risk Management Ltd
3All rights reserved.
4
5This file is part of ORE, a free-software/open-source library
6for transparent pricing and risk analysis - http://opensourcerisk.org
7
8ORE is free software: you can redistribute it and/or modify it
9under the terms of the Modified BSD License. You should have received a
10copy of the license along with this program.
11The license is also available online at <http://opensourcerisk.org>
12
13This program is distributed on the basis that it will form a useful
14contribution to risk analytics and model standardisation, but WITHOUT
15ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
16FITNESS FOR A PARTICULAR PURPOSE. See the license for more details.
17*/
18
19/*! \file strippedcapflooredyoyinflationcoupon.hpp
20\brief strips the embedded option from cap floored yoy inflation coupons
21*/
22
23#ifndef quantext_stripped_capfloored_yoyinflation_coupon_hpp
24#define quantext_stripped_capfloored_yoyinflation_coupon_hpp
25
26#include <ql/cashflows/capflooredinflationcoupon.hpp>
27#include <ql/cashflows/inflationcouponpricer.hpp>
28
29namespace QuantExt {
30using namespace QuantLib;
31
33
34public:
36 const ext::shared_ptr<CappedFlooredYoYInflationCoupon>& underlying);
37
38 //! Coupon interface
39 Rate rate() const override;
40 //! cap
41 Rate cap() const;
42 //! floor
43 Rate floor() const;
44 //! effective cap
45 Rate effectiveCap() const;
46 //! effective floor
47 Rate effectiveFloor() const;
48
49 //! Observer interface
50 void update() override;
51
52 //! Visitability
53 virtual void accept(AcyclicVisitor&) override;
54
55 bool isCap() const;
56 bool isFloor() const;
57 bool isCollar() const;
58
59 void setPricer(const ext::shared_ptr<YoYInflationCouponPricer>& pricer);
60
61 const ext::shared_ptr<CappedFlooredYoYInflationCoupon> underlying() { return underlying_; }
62
63protected:
64 ext::shared_ptr<CappedFlooredYoYInflationCoupon> underlying_;
65};
66
68public:
69 explicit StrippedCappedFlooredYoYInflationCouponLeg(const Leg& underlyingLeg);
70 operator Leg() const;
71
72private:
74};
75
76} // namespace QuantExt
77
78#endif
virtual void accept(AcyclicVisitor &) override
Visitability.
void setPricer(const ext::shared_ptr< YoYInflationCouponPricer > &pricer)
ext::shared_ptr< CappedFlooredYoYInflationCoupon > underlying_
const ext::shared_ptr< CappedFlooredYoYInflationCoupon > underlying()