Inflation Swap
financepy.products.rates.inflation_swap
Classes
InflationSwap
InflationSwap(start_dt: financepy.utils.date.Date, maturity_dt_or_tenor: financepy.utils.date.Date | str, fra_rate: float, accrual_dc_type: financepy.utils.day_count.DayCountTypes, notional: float = 100.0, pay_fixed_rate: bool = True, cal_type: financepy.utils.calendar.CalendarTypes = <CalendarTypes.WEEKEND: 2>, bd_type: financepy.utils.calendar.BusDayAdjustTypes = <BusDayAdjustTypes.MODIFIED_FOLLOWING: 3>)
Class for managing LIBOR forward rate agreements. A forward rate
agreement is an agreement to exchange a fixed pre-agreed rate for a
floating rate linked to LIBOR that is not known until some specified
future fixing date. The FRA payment occurs on or soon after this date
on the FRA settlement date. Typically the timing gap is two days.
A FRA is used to hedge a Ibor quality loan or lend of some agreed
notional amount. This period starts on the settlement date of the
FRA and ends on the maturity date of the FRA. For example a 1x4 FRA
relates to a Ibor starting in 1 month for a loan period ending in 4
months. Hence it links to 3-month Ibor rate. The amount received by a
payer of fixed rate at settlement is:
acc(1,2) * (Ibor(1,2) - FRA RATE) / (1 + acc(0,1) x Ibor(0,1))
So the value at time 0 is
acc(1,2) * (FWD Ibor(1,2) - FRA RATE) x df(0,2)
If the base date of the curve is before the value date then we
forward adjust this amount to that value date. For simplicity I have
assumed that the fixing date and the settlement date are the same date.
This should be amended later.
Methods
value
value(self, value_dt, libor_curve)
Determine mark to market value of a FRA contract based on the
market FRA rate. The same curve is used for calculating the forward
Ibor and for doing discounting on the expected forward payment.
maturity_df
maturity_df(self, libor_curve)
Determine the maturity date discount factor needed to refit
the FRA given the libor curve anbd the contract FRA rate.
print_payments
print_payments(self, value_dt)
Determine the value of the Deposit given a Ibor curve.
Generated automatically from the FinancePy source code.
Do not edit this file manually.