Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
subperiodsswaphelper.hpp
Go to the documentation of this file.
1/*
2 Copyright (C) 2017 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 subperiodsswaphelper.hpp
20 \brief Single currency sub periods swap helper
21 \ingroup termstructures
22*/
23
24#ifndef quantext_sub_period_swap_helper_hpp_
25#define quantext_sub_period_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 Sub Periods Swaps
35/*! \ingroup termstructures
36 */
38public:
39 SubPeriodsSwapHelper(Handle<Quote> spread, const Period& swapTenor, const Period& fixedTenor,
40 const Calendar& fixedCalendar, const DayCounter& fixedDayCount,
41 BusinessDayConvention fixedConvention, const Period& floatPayTenor,
42 const QuantLib::ext::shared_ptr<IborIndex>& iborIndex, const DayCounter& floatDayCount,
43 const Handle<YieldTermStructure>& discountingCurve = Handle<YieldTermStructure>(),
45
46 //! \name RateHelper interface
47 //@{
48 Real impliedQuote() const override;
49 void setTermStructure(YieldTermStructure*) override;
50 //@}
51 //! \name SubPeriodsSwapHelper inspectors
52 //@{
53 QuantLib::ext::shared_ptr<SubPeriodsSwap> swap() const { return swap_; }
54 //@}
55 //! \name Visitability
56 //@{
57 void accept(AcyclicVisitor&) override;
58 //@}
59
60protected:
61 void initializeDates() override;
62
63private:
64 QuantLib::ext::shared_ptr<SubPeriodsSwap> swap_;
65 QuantLib::ext::shared_ptr<IborIndex> iborIndex_;
66 Period swapTenor_;
69 DayCounter fixedDayCount_;
70 BusinessDayConvention fixedConvention_;
72 DayCounter floatDayCount_;
74
75 RelinkableHandle<YieldTermStructure> termStructureHandle_;
76 Handle<YieldTermStructure> discountHandle_;
77 RelinkableHandle<YieldTermStructure> discountRelinkableHandle_;
78};
79} // namespace QuantExt
80
81#endif
Rate helper for bootstrapping using Sub Periods Swaps.
RelinkableHandle< YieldTermStructure > discountRelinkableHandle_
void setTermStructure(YieldTermStructure *) override
BusinessDayConvention fixedConvention_
RelinkableHandle< YieldTermStructure > termStructureHandle_
Handle< YieldTermStructure > discountHandle_
void accept(AcyclicVisitor &) override
QuantLib::ext::shared_ptr< SubPeriodsSwap > swap_
QuantExt::SubPeriodsCoupon1::Type type_
QuantLib::ext::shared_ptr< IborIndex > iborIndex_
QuantLib::ext::shared_ptr< SubPeriodsSwap > swap() const
Single currency sub periods swap instrument.