Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
tenorbasisswaphelper.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 tenorbasisswaphelper.hpp
20 \brief Single currency tenor basis swap helper
21 \ingroup termstructures
22*/
23
24#ifndef quantext_tenor_basis_swap_helper_hpp
25#define quantext_tenor_basis_swap_helper_hpp
26
27#include <ql/termstructures/yield/ratehelpers.hpp>
28
30
31namespace QuantExt {
32using namespace QuantLib;
33
34//! Rate helper for bootstrapping using Libor tenor basis swaps
35/*! \ingroup termstructures
36 */
38public:
39 TenorBasisSwapHelper(Handle<Quote> spread, const Period& swapTenor, const QuantLib::ext::shared_ptr<IborIndex> payIndex,
40 const QuantLib::ext::shared_ptr<IborIndex> receiveIndex,
41 const Handle<YieldTermStructure>& discountingCurve = Handle<YieldTermStructure>(),
42 bool spreadOnRec = true, bool includeSpread = false, const Period& payFrequency = Period(),
43 const Period& recFrequency = Period(), const bool telescopicValueDates = false,
45
46 //! \name RateHelper interface
47 //@{
48 Real impliedQuote() const override;
49 void setTermStructure(YieldTermStructure*) override;
50 //@}
51 //! \name TenorBasisSwapHelper inspectors
52 //@{
53 QuantLib::ext::shared_ptr<TenorBasisSwap> swap() const { return swap_; }
54 //@}
55 //! \name Visitability
56 //@{
57 void accept(AcyclicVisitor&) override;
58 //@}
59
60protected:
61 void initializeDates() override;
62
63 Period swapTenor_;
64 QuantLib::ext::shared_ptr<IborIndex> payIndex_;
65 QuantLib::ext::shared_ptr<IborIndex> receiveIndex_;
73
74 QuantLib::ext::shared_ptr<TenorBasisSwap> swap_;
75 RelinkableHandle<YieldTermStructure> termStructureHandle_;
76 Handle<YieldTermStructure> discountHandle_;
77 RelinkableHandle<YieldTermStructure> discountRelinkableHandle_;
78};
79} // namespace QuantExt
80
81#endif
Rate helper for bootstrapping using Libor tenor basis swaps.
QuantLib::ext::shared_ptr< IborIndex > payIndex_
RelinkableHandle< YieldTermStructure > discountRelinkableHandle_
void setTermStructure(YieldTermStructure *) override
QuantLib::ext::shared_ptr< IborIndex > receiveIndex_
RelinkableHandle< YieldTermStructure > termStructureHandle_
Handle< YieldTermStructure > discountHandle_
void accept(AcyclicVisitor &) override
QuantLib::ext::shared_ptr< TenorBasisSwap > swap() const
QuantLib::ext::shared_ptr< TenorBasisSwap > swap_
QuantExt::SubPeriodsCoupon1::Type type_
Single currency tenor basis swap instrument.