Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
oiccbasisswaphelper.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 oiccbasisswaphelper.hpp
20 \brief Overnight Indexed Cross Currency Basis Swap helpers
21 \ingroup termstructures
22*/
23
24#ifndef quantlib_oiccbasisswap_helper_hpp
25#define quantlib_oiccbasisswap_helper_hpp
26
27#include <ql/instruments/overnightindexedswap.hpp>
28#include <ql/termstructures/yield/ratehelpers.hpp>
30
31namespace QuantExt {
32
33//! Rate helper for bootstrapping over Overnight Indexed CC Basis Swap Spreads
34/*
35 The bootstrap affects the receive leg's discount curve only.
36
37 \ingroup termstructures
38*/
40public:
41 OICCBSHelper(Natural settlementDays,
42 const Period& term, // swap maturity
43 const QuantLib::ext::shared_ptr<OvernightIndex>& payIndex, const Period& payTenor,
44 const QuantLib::ext::shared_ptr<OvernightIndex>& recIndex, const Period& recTenor,
45 const Handle<Quote>& spreadQuote, const Handle<YieldTermStructure>& fixedDiscountCurve,
46 bool spreadQuoteOnPayLeg, bool fixedDiscountOnPayLeg);
47 //! \name RateHelper interface
48 //@{
49 Real impliedQuote() const override;
50 void setTermStructure(YieldTermStructure*) override;
51 //@}
52 //! \name inspectors
53 //@{
54 QuantLib::ext::shared_ptr<OvernightIndexedCrossCcyBasisSwap> swap() const { return swap_; }
55 //@}
56 //! \name Visitability
57 //@{
58 void accept(AcyclicVisitor&) override;
59 //@}
60protected:
61 void initializeDates() override;
62
64 Period term_;
65 QuantLib::ext::shared_ptr<OvernightIndex> payIndex_;
66 Period payTenor_;
67 QuantLib::ext::shared_ptr<OvernightIndex> recIndex_;
68 Period recTenor_;
69 Handle<YieldTermStructure> fixedDiscountCurve_;
72
73 QuantLib::ext::shared_ptr<OvernightIndexedCrossCcyBasisSwap> swap_;
74 RelinkableHandle<YieldTermStructure> termStructureHandle_;
75};
76} // namespace QuantExt
77
78#endif
Rate helper for bootstrapping over Overnight Indexed CC Basis Swap Spreads.
void setTermStructure(YieldTermStructure *) override
QuantLib::ext::shared_ptr< OvernightIndex > recIndex_
RelinkableHandle< YieldTermStructure > termStructureHandle_
void accept(AcyclicVisitor &) override
QuantLib::ext::shared_ptr< OvernightIndexedCrossCcyBasisSwap > swap_
Real impliedQuote() const override
QuantLib::ext::shared_ptr< OvernightIndex > payIndex_
Handle< YieldTermStructure > fixedDiscountCurve_
QuantLib::ext::shared_ptr< OvernightIndexedCrossCcyBasisSwap > swap() const
Cross currency overnight index swap paying compounded overnight vs. float.