|
QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.38
|
Rate helper for bootstrapping over Fx Swap rates. More...
#include <ratehelpers.hpp>
Inheritance diagram for FxSwapRateHelper:
Collaboration diagram for FxSwapRateHelper:Public Member Functions | |
| FxSwapRateHelper (const Handle< Quote > &fwdPoint, Handle< Quote > spotFx, const Period &tenor, Natural fixingDays, Calendar calendar, BusinessDayConvention convention, bool endOfMonth, bool isFxBaseCurrencyCollateralCurrency, Handle< YieldTermStructure > collateralCurve, Calendar tradingCalendar=Calendar()) | |
RateHelper interface | |
| Real | impliedQuote () const override |
| void | setTermStructure (YieldTermStructure *) override |
FxSwapRateHelper inspectors | |
| Real | spot () const |
| Period | tenor () const |
| Natural | fixingDays () const |
| Calendar | calendar () const |
| BusinessDayConvention | businessDayConvention () const |
| bool | endOfMonth () const |
| bool | isFxBaseCurrencyCollateralCurrency () const |
| Calendar | tradingCalendar () const |
| Calendar | adjustmentCalendar () const |
Public Member Functions inherited from RelativeDateBootstrapHelper< TS > | |
| RelativeDateBootstrapHelper (const std::variant< Spread, Handle< Quote > > "e, bool updateDates=true) | |
| void | update () override |
Public Member Functions inherited from BootstrapHelper< TS > | |
| BootstrapHelper (const std::variant< Spread, Handle< Quote > > "e) | |
| ~BootstrapHelper () override=default | |
| const Handle< Quote > & | quote () const |
| Real | quoteError () const |
| virtual void | setTermStructure (TS *) |
| sets the term structure to be used for pricing More... | |
| virtual Date | earliestDate () const |
| earliest relevant date More... | |
| virtual Date | maturityDate () const |
| instrument's maturity date More... | |
| virtual Date | latestRelevantDate () const |
| latest relevant date More... | |
| virtual Date | pillarDate () const |
| pillar date More... | |
| virtual Date | latestDate () const |
| latest date More... | |
Public Member Functions inherited from Observer | |
| Observer ()=default | |
| Observer (const Observer &) | |
| Observer & | operator= (const Observer &) |
| virtual | ~Observer () |
| std::pair< iterator, bool > | registerWith (const ext::shared_ptr< Observable > &) |
| void | registerWithObservables (const ext::shared_ptr< Observer > &) |
| Size | unregisterWith (const ext::shared_ptr< Observable > &) |
| void | unregisterWithAll () |
| virtual void | update ()=0 |
| virtual void | deepUpdate () |
Public Member Functions inherited from Observable | |
| Observable ()=default | |
| Observable (const Observable &) | |
| Observable & | operator= (const Observable &) |
| Observable (Observable &&)=delete | |
| Observable & | operator= (Observable &&)=delete |
| virtual | ~Observable ()=default |
| void | notifyObservers () |
Visitability | |
| Handle< Quote > | spot_ |
| Period | tenor_ |
| Natural | fixingDays_ |
| Calendar | cal_ |
| BusinessDayConvention | conv_ |
| bool | eom_ |
| bool | isFxBaseCurrencyCollateralCurrency_ |
| RelinkableHandle< YieldTermStructure > | termStructureHandle_ |
| Handle< YieldTermStructure > | collHandle_ |
| RelinkableHandle< YieldTermStructure > | collRelinkableHandle_ |
| Calendar | tradingCalendar_ |
| Calendar | jointCalendar_ |
| void | accept (AcyclicVisitor &) override |
| void | initializeDates () override |
Additional Inherited Members | |
Public Types inherited from Observer | |
| typedef set_type::iterator | iterator |
Protected Member Functions inherited from RelativeDateBootstrapHelper< TS > | |
Protected Attributes inherited from RelativeDateBootstrapHelper< TS > | |
| Date | evaluationDate_ |
| bool | updateDates_ |
Protected Attributes inherited from BootstrapHelper< TS > | |
| Handle< Quote > | quote_ |
| TS * | termStructure_ |
| Date | earliestDate_ |
| Date | latestDate_ |
| Date | maturityDate_ |
| Date | latestRelevantDate_ |
| Date | pillarDate_ |
Rate helper for bootstrapping over Fx Swap rates.
The forward is given by fwdFx = spotFx + fwdPoint.
isFxBaseCurrencyCollateralCurrency indicates if the base currency of the FX currency pair is the one used as collateral.
calendar is usually the joint calendar of the two currencies in the pair.
tradingCalendar can be used when the cross pairs don't include the currency of the business center (usually USD; the corresponding calendar is UnitedStates). If given, it will be used for adjusting the earliest settlement date and for setting the latest date. Due to FX spot market conventions, it is not sufficient to pass a JointCalendar with UnitedStates included as calendar; with regard the earliest date, this calendar is only used in case the spot date of the two currencies is not a US business day.
fixingDays to 0 and using a tenor of '1d'. The same tenor should be used for TN swaps, with fixingDays set to 1. However, handling ON and TN swaps for cross rates without USD is not trivial and should be treated with caution. If today is a US holiday, ON trade is not possible. If tomorrow is a US Holiday, the ON trade will be at least two business days long in the other countries and the TN trade will not exist. In such cases, if this helper is used for curve construction, probably it is safer not to pass a trading calendar to the ON and TN helpers and provide fwdPoints that will yield proper level of discount factors. Definition at line 358 of file ratehelpers.hpp.
| FxSwapRateHelper | ( | const Handle< Quote > & | fwdPoint, |
| Handle< Quote > | spotFx, | ||
| const Period & | tenor, | ||
| Natural | fixingDays, | ||
| Calendar | calendar, | ||
| BusinessDayConvention | convention, | ||
| bool | endOfMonth, | ||
| bool | isFxBaseCurrencyCollateralCurrency, | ||
| Handle< YieldTermStructure > | collateralCurve, | ||
| Calendar | tradingCalendar = Calendar() |
||
| ) |
|
overridevirtual |
Implements BootstrapHelper< TS >.
Definition at line 773 of file ratehelpers.cpp.
Here is the call graph for this function:
|
override |
| Real spot | ( | ) | const |
| Period tenor | ( | ) | const |
Definition at line 378 of file ratehelpers.hpp.
| Natural fixingDays | ( | ) | const |
Definition at line 379 of file ratehelpers.hpp.
| Calendar calendar | ( | ) | const |
Definition at line 380 of file ratehelpers.hpp.
| BusinessDayConvention businessDayConvention | ( | ) | const |
Definition at line 381 of file ratehelpers.hpp.
| bool endOfMonth | ( | ) | const |
Definition at line 382 of file ratehelpers.hpp.
| bool isFxBaseCurrencyCollateralCurrency | ( | ) | const |
Definition at line 383 of file ratehelpers.hpp.
| Calendar tradingCalendar | ( | ) | const |
Definition at line 385 of file ratehelpers.hpp.
| Calendar adjustmentCalendar | ( | ) | const |
Definition at line 386 of file ratehelpers.hpp.
|
overridevirtual |
Reimplemented from BootstrapHelper< TS >.
Definition at line 805 of file ratehelpers.cpp.
Here is the call graph for this function:
|
overrideprivatevirtual |
Implements RelativeDateBootstrapHelper< TS >.
Definition at line 757 of file ratehelpers.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 394 of file ratehelpers.hpp.
|
private |
Definition at line 395 of file ratehelpers.hpp.
|
private |
Definition at line 396 of file ratehelpers.hpp.
|
private |
Definition at line 397 of file ratehelpers.hpp.
|
private |
Definition at line 398 of file ratehelpers.hpp.
|
private |
Definition at line 399 of file ratehelpers.hpp.
|
private |
Definition at line 400 of file ratehelpers.hpp.
|
private |
Definition at line 402 of file ratehelpers.hpp.
|
private |
Definition at line 404 of file ratehelpers.hpp.
|
private |
Definition at line 405 of file ratehelpers.hpp.
|
private |
Definition at line 407 of file ratehelpers.hpp.
|
private |
Definition at line 408 of file ratehelpers.hpp.