Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
crossccyfixfloatmtmresetswaphelper.hpp
Go to the documentation of this file.
1/*
2 Copyright (C) 2021 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 crossccybasismtmresetswaphelper.hpp
20 \brief Cross currency basis swap helper with MTM reset
21 \ingroup termstructures
22*/
23
24#ifndef quantext_cross_ccy_fix_float_mtmreset_swap_helper_hpp
25#define quantext_cross_ccy_fix_float_mtmreset_swap_helper_hpp
26
27#include <ql/termstructures/yield/ratehelpers.hpp>
28
30
31namespace QuantExt {
32
33//! Cross Ccy Fix Float MtM Reset Swap Rate Helper
34/*! Rate helper for bootstrapping over cross currency fix float (MtM reset) swap
35
36 The resets are applied to the domestic leg (foreign currency is constant notional)
37
38 Assumes that you have, at a minimum, either:
39 - foreign ccy index with attached YieldTermStructure and discountCurve
40 - domestic ccy with attached YieldTermStructure and discountCurve
41
42 The other leg is then solved for i.e. index curve (if no
43 YieldTermStructure is attached to its index) or discount curve (if
44 its Handle is empty) or both.
45
46 The currencies are deduced from the ibor indexes. The spotFx
47 to be quoted with either of these currencies, this is determined
48 by the invertFxIndex flag. The settlement date of the spot is
49 assumed to be equal to the settlement date of the swap itself.
50
51 \ingroup termstructures
52*/
54public:
56 const QuantLib::Handle<QuantLib::Quote>& rate,
57 const QuantLib::Handle<QuantLib::Quote>& spotFx, QuantLib::Natural settlementDays,
58 const QuantLib::Calendar& paymentCalendar,
59 QuantLib::BusinessDayConvention paymentConvention, const QuantLib::Period& tenor,
60 const QuantLib::Currency& fixedCurrency, QuantLib::Frequency fixedFrequency,
61 QuantLib::BusinessDayConvention fixedConvention,
62 const QuantLib::DayCounter& fixedDayCount,
63 const QuantLib::ext::shared_ptr<QuantLib::IborIndex>& index,
64 const QuantLib::Handle<QuantLib::YieldTermStructure>& floatDiscount,
65 const Handle<Quote>& spread = Handle<Quote>(), bool endOfMonth = false,
66 bool resetsOnFloatLeg = true);
67 //! \name RateHelper interface
68 //@{
69 Real impliedQuote() const override;
70 void setTermStructure(YieldTermStructure*) override;
71 //@}
72 //! \name Observer interface
73 //@{
74 void update() override;
75 //@}
76 //! \name inspectors
77 //@{
78 QuantLib::ext::shared_ptr<CrossCcyFixFloatMtMResetSwap> swap() const { return swap_; }
79 //@}
80 //! \name Visitability
81 //@{
82 void accept(AcyclicVisitor&) override;
83 //@}
84
85protected:
86 void initializeDates() override;
87
88 QuantLib::Handle<QuantLib::Quote> spotFx_;
89 QuantLib::Natural settlementDays_;
90 QuantLib::Calendar paymentCalendar_;
91 QuantLib::BusinessDayConvention paymentConvention_;
92 QuantLib::Period tenor_;
93 QuantLib::Currency fixedCurrency_;
94 QuantLib::Frequency fixedFrequency_;
95 QuantLib::BusinessDayConvention fixedConvention_;
96 QuantLib::DayCounter fixedDayCount_;
97 QuantLib::ext::shared_ptr<QuantLib::IborIndex> index_;
98 QuantLib::Handle<QuantLib::YieldTermStructure> floatDiscount_;
99 QuantLib::Handle<QuantLib::Quote> spread_;
102
103 QuantLib::ext::shared_ptr<CrossCcyFixFloatMtMResetSwap> swap_;
104
105 RelinkableHandle<YieldTermStructure> termStructureHandle_;
106};
107} // namespace QuantExt
108
109#endif
Cross Ccy Fix Float MtM Reset Swap Rate Helper.
QuantLib::ext::shared_ptr< CrossCcyFixFloatMtMResetSwap > swap_
QuantLib::ext::shared_ptr< CrossCcyFixFloatMtMResetSwap > swap() const
QuantLib::Handle< QuantLib::YieldTermStructure > floatDiscount_
QuantLib::ext::shared_ptr< QuantLib::IborIndex > index_
Cross currency fix float swap instrument with MTM reset.