Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
averageoisratehelper.hpp
Go to the documentation of this file.
1/*
2 Copyright (C) 2016 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 averageoisratehelper.hpp
20 \brief Rate helpers to facilitate usage of AverageOIS in bootstrapping
21 \ingroup termstructures
22*/
23
24#ifndef quantext_average_ois_rate_helper_hpp
25#define quantext_average_ois_rate_helper_hpp
26
27#include <ql/termstructures/yield/ratehelpers.hpp>
28
30
31namespace QuantExt {
32using namespace QuantLib;
33
34//! Average OIS Rate Helper
35/*! Rate helper to facilitate the usage of an AverageOIS instrument in
36 bootstrapping. This instrument pays a fixed leg vs. a leg that
37 pays the arithmetic average of an ON index plus a spread.
38
39 \ingroup termstructures
40*/
42public:
43 AverageOISRateHelper(const Handle<Quote>& fixedRate, const Period& spotLagTenor, const Period& swapTenor,
44 // Fixed leg
45 const Period& fixedTenor, const DayCounter& fixedDayCounter, const Calendar& fixedCalendar,
46 BusinessDayConvention fixedConvention, BusinessDayConvention fixedPaymentAdjustment,
47 // ON leg
48 const QuantLib::ext::shared_ptr<OvernightIndex>& overnightIndex, const Period& onTenor,
49 const Handle<Quote>& onSpread, Natural rateCutoff,
50 // Exogenous discount curve
51 const Handle<YieldTermStructure>& discountCurve = Handle<YieldTermStructure>(),
52 const bool telescopicValueDates = false);
53
54 //! \name RateHelper interface
55 //@{
56 Real impliedQuote() const override;
57 void setTermStructure(YieldTermStructure*) override;
58 //@}
59 //! \name AverageOISRateHelper inspectors
60 //@{
61 Spread onSpread() const;
62 QuantLib::ext::shared_ptr<AverageOIS> averageOIS() const;
63 //@}
64 //! \name Visitability
65 //@{
66 void accept(AcyclicVisitor&) override;
67 //@}
68protected:
69 void initializeDates() override;
70 QuantLib::ext::shared_ptr<AverageOIS> averageOIS_;
71 // Swap
73 Period swapTenor_;
74 // Fixed leg
76 DayCounter fixedDayCounter_;
78 BusinessDayConvention fixedConvention_;
79 BusinessDayConvention fixedPaymentAdjustment_;
80 // ON leg
81 QuantLib::ext::shared_ptr<OvernightIndex> overnightIndex_;
82 Period onTenor_;
83 Handle<Quote> onSpread_;
84 Natural rateCutoff_;
85 // Curves
86 RelinkableHandle<YieldTermStructure> termStructureHandle_;
87 Handle<YieldTermStructure> discountHandle_;
88 RelinkableHandle<YieldTermStructure> discountRelinkableHandle_;
90};
91} // namespace QuantExt
92
93#endif
Swap of arithmetic average overnight index against fixed.
RelinkableHandle< YieldTermStructure > discountRelinkableHandle_
void setTermStructure(YieldTermStructure *) override
BusinessDayConvention fixedConvention_
QuantLib::ext::shared_ptr< OvernightIndex > overnightIndex_
RelinkableHandle< YieldTermStructure > termStructureHandle_
BusinessDayConvention fixedPaymentAdjustment_
QuantLib::ext::shared_ptr< AverageOIS > averageOIS_
Handle< YieldTermStructure > discountHandle_
void accept(AcyclicVisitor &) override
QuantLib::ext::shared_ptr< AverageOIS > averageOIS() const