Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
brlcdiratehelper.hpp
Go to the documentation of this file.
1/*
2 Copyright (C) 2019 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/brlcdiratehelper.hpp
20 \brief Rate helper based on standard BRL CDI swap
21 \ingroup termstructures
22*/
23
24#ifndef quantext_brl_cdi_rate_helper_hpp
25#define quantext_brl_cdi_rate_helper_hpp
26
27#include <ql/termstructures/yield/ratehelpers.hpp>
30
31namespace QuantExt {
32
33/*! Tenor based rate helper for bootstrapping using standard BRL CDI swaps
34 \ingroup termstructures
35*/
36class BRLCdiRateHelper : public QuantLib::RelativeDateRateHelper {
37public:
38 BRLCdiRateHelper(const QuantLib::Period& swapTenor, const QuantLib::Handle<QuantLib::Quote>& fixedRate,
39 const QuantLib::ext::shared_ptr<BRLCdi>& brlCdiIndex,
40 const QuantLib::Handle<QuantLib::YieldTermStructure>& discountingCurve =
41 QuantLib::Handle<QuantLib::YieldTermStructure>(),
42 bool telescopicValueDates = false);
43
44 //! \name inspectors
45 //@{
46 QuantLib::ext::shared_ptr<BRLCdiSwap> swap() const { return swap_; }
47 //@}
48
49 //! \name RateHelper interface
50 //@{
51 QuantLib::Real impliedQuote() const override;
52 void setTermStructure(QuantLib::YieldTermStructure*) override;
53 //@}
54
55 //! \name Visitability
56 //@{
57 void accept(QuantLib::AcyclicVisitor&) override;
58 //@}
59
60protected:
61 void initializeDates() override;
62
63 QuantLib::Period swapTenor_;
64 QuantLib::ext::shared_ptr<BRLCdi> brlCdiIndex_;
65 QuantLib::ext::shared_ptr<BRLCdiSwap> swap_;
67
68 QuantLib::RelinkableHandle<QuantLib::YieldTermStructure> termStructureHandle_;
69 QuantLib::Handle<QuantLib::YieldTermStructure> discountHandle_;
70 QuantLib::RelinkableHandle<QuantLib::YieldTermStructure> discountRelinkableHandle_;
71};
72
73/*! Absolute date based rate helper for bootstrapping using standard BRL CDI swaps
74 \ingroup termstructures
75*/
76class DatedBRLCdiRateHelper : public QuantLib::RateHelper {
77public:
78 DatedBRLCdiRateHelper(const QuantLib::Date& startDate, const QuantLib::Date& endDate,
79 const QuantLib::Handle<QuantLib::Quote>& fixedRate,
80 const QuantLib::ext::shared_ptr<BRLCdi>& brlCdiIndex,
81 const QuantLib::Handle<QuantLib::YieldTermStructure>& discountingCurve =
82 QuantLib::Handle<QuantLib::YieldTermStructure>(),
83 bool telescopicValueDates = false);
84
85 //! \name inspectors
86 //@{
87 QuantLib::ext::shared_ptr<BRLCdiSwap> swap() const { return swap_; }
88 //@}
89
90 //! \name RateHelper interface
91 //@{
92 QuantLib::Real impliedQuote() const override;
93 void setTermStructure(QuantLib::YieldTermStructure*) override;
94 //@}
95
96 //! \name Visitability
97 //@{
98 void accept(QuantLib::AcyclicVisitor&) override;
99 //@}
100
101protected:
102 QuantLib::ext::shared_ptr<BRLCdi> brlCdiIndex_;
103 QuantLib::ext::shared_ptr<BRLCdiSwap> swap_;
105
106 QuantLib::RelinkableHandle<QuantLib::YieldTermStructure> termStructureHandle_;
107 QuantLib::Handle<QuantLib::YieldTermStructure> discountHandle_;
108 QuantLib::RelinkableHandle<QuantLib::YieldTermStructure> discountRelinkableHandle_;
109};
110
111} // namespace QuantExt
112
113#endif
BRL-CDI index.
Standard BRL CDI swap.
QuantLib::RelinkableHandle< QuantLib::YieldTermStructure > discountRelinkableHandle_
QuantLib::ext::shared_ptr< BRLCdiSwap > swap_
void accept(QuantLib::AcyclicVisitor &) override
QuantLib::RelinkableHandle< QuantLib::YieldTermStructure > termStructureHandle_
QuantLib::ext::shared_ptr< BRLCdi > brlCdiIndex_
QuantLib::ext::shared_ptr< BRLCdiSwap > swap() const
QuantLib::Real impliedQuote() const override
void setTermStructure(QuantLib::YieldTermStructure *) override
QuantLib::Handle< QuantLib::YieldTermStructure > discountHandle_
QuantLib::RelinkableHandle< QuantLib::YieldTermStructure > discountRelinkableHandle_
QuantLib::ext::shared_ptr< BRLCdiSwap > swap_
void accept(QuantLib::AcyclicVisitor &) override
QuantLib::RelinkableHandle< QuantLib::YieldTermStructure > termStructureHandle_
QuantLib::ext::shared_ptr< BRLCdi > brlCdiIndex_
QuantLib::ext::shared_ptr< BRLCdiSwap > swap() const
QuantLib::Real impliedQuote() const override
void setTermStructure(QuantLib::YieldTermStructure *) override
QuantLib::Handle< QuantLib::YieldTermStructure > discountHandle_