QuantLib: a free/open-source library for quantitative finance
Fully annotated sources - version 1.32
Loading...
Searching...
No Matches
crosscurrencyratehelpers.hpp
1/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
3/*
4 Copyright (C) 2021 Marcin Rybacki
5
6 This file is part of QuantLib, a free-software/open-source library
7 for financial quantitative analysts and developers - http://quantlib.org/
8
9 QuantLib is free software: you can redistribute it and/or modify it
10 under the terms of the QuantLib license. You should have received a
11 copy of the license along with this program; if not, please email
12 <quantlib-dev@lists.sf.net>. The license is also available online at
13 <http://quantlib.org/license.shtml>.
14
15 This program is distributed in the hope that it will be useful, but WITHOUT
16 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 FOR A PARTICULAR PURPOSE. See the license for more details.
18*/
19
24#ifndef quantlib_crosscurrencyratehelpers_hpp
25#define quantlib_crosscurrencyratehelpers_hpp
26
27#include <ql/termstructures/yield/ratehelpers.hpp>
28
29namespace QuantLib {
30
33 public:
35
38 protected:
40 const Period& tenor,
41 Natural fixingDays,
42 Calendar calendar,
43 BusinessDayConvention convention,
44 bool endOfMonth,
45 ext::shared_ptr<IborIndex> baseCurrencyIndex,
46 ext::shared_ptr<IborIndex> quoteCurrencyIndex,
47 Handle<YieldTermStructure> collateralCurve,
48 bool isFxBaseCurrencyCollateralCurrency,
49 bool isBasisOnFxBaseCurrencyLeg);
50
51 void initializeDates() override;
54
60 ext::shared_ptr<IborIndex> baseCcyIdx_;
61 ext::shared_ptr<IborIndex> quoteCcyIdx_;
65
68
70 };
71
73
96 public:
98 const Handle<Quote>& basis,
99 const Period& tenor,
100 Natural fixingDays,
101 const Calendar& calendar,
102 BusinessDayConvention convention,
103 bool endOfMonth,
104 const ext::shared_ptr<IborIndex>& baseCurrencyIndex,
105 const ext::shared_ptr<IborIndex>& quoteCurrencyIndex,
106 const Handle<YieldTermStructure>& collateralCurve,
107 bool isFxBaseCurrencyCollateralCurrency,
108 bool isBasisOnFxBaseCurrencyLeg);
110
111 Real impliedQuote() const override;
113
115 void accept(AcyclicVisitor&) override;
117 };
118
119
121
133 public:
135 const Period& tenor,
136 Natural fixingDays,
137 const Calendar& calendar,
138 BusinessDayConvention convention,
139 bool endOfMonth,
140 const ext::shared_ptr<IborIndex>& baseCurrencyIndex,
141 const ext::shared_ptr<IborIndex>& quoteCurrencyIndex,
142 const Handle<YieldTermStructure>& collateralCurve,
143 bool isFxBaseCurrencyCollateralCurrency,
144 bool isBasisOnFxBaseCurrencyLeg,
145 bool isFxBaseCurrencyLegResettable);
147
148 Real impliedQuote() const override;
150
152 void accept(AcyclicVisitor&) override;
154 private:
156 };
157}
158
159#endif
degenerate base class for the Acyclic Visitor pattern
Definition: visitor.hpp:33
calendar class
Definition: calendar.hpp:61
Rate helper for bootstrapping over constant-notional cross-currency basis swaps.
Base class for cross-currency basis swap rate helpers.
void setTermStructure(YieldTermStructure *) override
RelinkableHandle< YieldTermStructure > termStructureHandle_
const Handle< YieldTermStructure > & baseCcyLegDiscountHandle() const
const Handle< YieldTermStructure > & quoteCcyLegDiscountHandle() const
Shared handle to an observable.
Definition: handle.hpp:41
Rate helper for bootstrapping over market-to-market cross-currency basis swaps.
Bootstrap helper with date schedule relative to global evaluation date.
Relinkable handle to an observable.
Definition: handle.hpp:112
Interest-rate term structure.
BusinessDayConvention
Business Day conventions.
QL_REAL Real
real number
Definition: types.hpp:50
unsigned QL_INTEGER Natural
positive integer
Definition: types.hpp:43
Definition: any.hpp:35
std::vector< ext::shared_ptr< CashFlow > > Leg
Sequence of cash-flows.
Definition: cashflow.hpp:78