quantlib.termstructures.yields.rate_helpers.FxSwapRateHelper¶
- class FxSwapRateHelper(Quote fwd_point, Quote spot_fx, Period tenor, Natural fixing_days, Calendar calendar, BusinessDayConvention convention, bool end_of_month, bool is_fx_base_currency_collateral_currency, YieldTermStructure collateral_curve, Calendar trading_calendar=Calendar())¶
Bases:
RelativeDateRateHelper
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.
Warning
The ON fx swaps can be achieved by setting 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.
- __init__(*args, **kwargs)¶
Methods
__init__
(*args, **kwargs)update
(self)Attributes
adjustment_calendar
business_day_convention
calendar
earliest_date
end_of_month
implied_quote
is_fx_base_currency_collateral_currency
latest_date
maturity_date
quote
spot
tenor
trading_calendar