QuantLib: a free/open-source library for quantitative finance
Fully annotated sources - version 1.32
Loading...
Searching...
No Matches
strippedcapflooredcoupon.hpp
1/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
3/*
4 Copyright (C) 2014 Peter Caspers
5
6 This file is part of QuantLib, a free-software/open-source library
7 for financial quantitative analysts and developers - http://quantlib.org/
8
9 QuantLib is free software: you can redistribute it and/or modify it
10 under the terms of the QuantLib license. You should have received a
11 copy of the license along with this program; if not, please email
12 <quantlib-dev@lists.sf.net>. The license is also available online at
13 <http://quantlib.org/license.shtml>.
14
15 This program is distributed in the hope that it will be useful, but WITHOUT
16 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 FOR A PARTICULAR PURPOSE. See the license for more details.
18*/
19
24#ifndef quantlib_stripped_capfloored_coupon_hpp
25#define quantlib_stripped_capfloored_coupon_hpp
26
27#include <ql/cashflows/capflooredcoupon.hpp>
28
29namespace QuantLib {
30
32
33 public:
34
35 explicit StrippedCappedFlooredCoupon(const ext::shared_ptr<CappedFlooredCoupon> &underlying);
36
38
39 void deepUpdate() override;
41
43
44 void performCalculations() const override;
46
47 Rate rate() const override;
48 Rate convexityAdjustment() const override;
50 Rate cap() const;
52 Rate floor() const;
54 Rate effectiveCap() const;
56 Rate effectiveFloor() const;
57
59 void accept(AcyclicVisitor&) override;
60
61 bool isCap() const;
62 bool isFloor() const;
63 bool isCollar() const;
64
65 void setPricer(const ext::shared_ptr<FloatingRateCouponPricer>& pricer) override;
66
67 ext::shared_ptr<CappedFlooredCoupon> underlying() { return underlying_; }
68
69 protected:
70 ext::shared_ptr<CappedFlooredCoupon> underlying_;
71
72 };
73
75 public:
76 explicit StrippedCappedFlooredCouponLeg(Leg underlyingLeg);
77 operator Leg() const;
78 private:
80 };
81
82}
83
84
85#endif
degenerate base class for the Acyclic Visitor pattern
Definition: visitor.hpp:33
base floating-rate coupon class
ext::shared_ptr< FloatingRateCouponPricer > pricer() const
ext::shared_ptr< CappedFlooredCoupon > underlying()
Rate rate() const override
Coupon interface.
void accept(AcyclicVisitor &) override
Visitability.
void setPricer(const ext::shared_ptr< FloatingRateCouponPricer > &pricer) override
ext::shared_ptr< CappedFlooredCoupon > underlying_
Rate convexityAdjustment() const override
convexity adjustment
Real Rate
interest rates
Definition: types.hpp:70
Definition: any.hpp:35
std::vector< ext::shared_ptr< CashFlow > > Leg
Sequence of cash-flows.
Definition: cashflow.hpp:78