Logo
Fully annotated reference manual - version 1.8.12
Loading...
Searching...
No Matches
crossccyfixfloatswaphelper.hpp
Go to the documentation of this file.
1/*
2 Copyright (C) 2018 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 qle/termstructures/crossccyfixfloatswaphelper.hpp
20 \brief Cross currency fixed vs. float swap helper
21
22 \ingroup termstructures
23*/
24
25#ifndef quantext_cross_ccy_fix_float_swap_helper_hpp
26#define quantext_cross_ccy_fix_float_swap_helper_hpp
27
28#include <ql/termstructures/yield/ratehelpers.hpp>
29
31
32namespace QuantExt {
33
34//! Cross currency fix vs. float swap helper
35/*! Rate helper for bootstrapping with fixed vs. float cross currency swaps
36
37 \ingroup termstructures
38*/
40public:
41 CrossCcyFixFloatSwapHelper(const QuantLib::Handle<QuantLib::Quote>& rate,
42 const QuantLib::Handle<QuantLib::Quote>& spotFx, QuantLib::Natural settlementDays,
43 const QuantLib::Calendar& paymentCalendar,
44 QuantLib::BusinessDayConvention paymentConvention, const QuantLib::Period& tenor,
45 const QuantLib::Currency& fixedCurrency, QuantLib::Frequency fixedFrequency,
46 QuantLib::BusinessDayConvention fixedConvention,
47 const QuantLib::DayCounter& fixedDayCount,
48 const QuantLib::ext::shared_ptr<QuantLib::IborIndex>& index,
49 const QuantLib::Handle<QuantLib::YieldTermStructure>& floatDiscount,
50 const Handle<Quote>& spread = Handle<Quote>(), bool endOfMonth = false);
51
52 //! \name Observer interface
53 //@{
54 void update() override;
55 //@}
56
57 //! \name BootstrapHelper interface
58 //@{
59 QuantLib::Real impliedQuote() const override;
60 void setTermStructure(QuantLib::YieldTermStructure*) override;
61 //@}
62
63 //! \name Inspectors
64 //@{
65 QuantLib::ext::shared_ptr<CrossCcyFixFloatSwap> swap() const { return swap_; }
66 //@}
67
68 //! \name Visitability
69 //@{
70 void accept(QuantLib::AcyclicVisitor&) override;
71 //@}
72
73private:
74 //! \name RelativeDateBootstrapHelper interface
75 //@{
76 void initializeDates() override;
77 //@}
78
79 QuantLib::Handle<QuantLib::Quote> spotFx_;
80 QuantLib::Natural settlementDays_;
81 QuantLib::Calendar paymentCalendar_;
82 QuantLib::BusinessDayConvention paymentConvention_;
83 QuantLib::Period tenor_;
84 QuantLib::Currency fixedCurrency_;
85 QuantLib::Frequency fixedFrequency_;
86 QuantLib::BusinessDayConvention fixedConvention_;
87 QuantLib::DayCounter fixedDayCount_;
88 QuantLib::ext::shared_ptr<QuantLib::IborIndex> index_;
89 QuantLib::Handle<QuantLib::YieldTermStructure> floatDiscount_;
90 QuantLib::Handle<QuantLib::Quote> spread_;
92
93 QuantLib::ext::shared_ptr<CrossCcyFixFloatSwap> swap_;
94 QuantLib::RelinkableHandle<QuantLib::YieldTermStructure> termStructureHandle_;
95};
96
97} // namespace QuantExt
98
99#endif
Cross currency fix vs. float swap helper.
QuantLib::Handle< QuantLib::Quote > spotFx_
QuantLib::BusinessDayConvention paymentConvention_
QuantLib::Handle< QuantLib::Quote > spread_
void accept(QuantLib::AcyclicVisitor &) override
QuantLib::ext::shared_ptr< CrossCcyFixFloatSwap > swap() const
QuantLib::RelinkableHandle< QuantLib::YieldTermStructure > termStructureHandle_
QuantLib::Real impliedQuote() const override
QuantLib::BusinessDayConvention fixedConvention_
QuantLib::ext::shared_ptr< CrossCcyFixFloatSwap > swap_
void setTermStructure(QuantLib::YieldTermStructure *) override
QuantLib::Handle< QuantLib::YieldTermStructure > floatDiscount_
QuantLib::ext::shared_ptr< QuantLib::IborIndex > index_
Cross currency fixed vs float swap instrument.