Ois
financepy.products.rates.ois
Classes
OIS
OIS(effective_dt: financepy.utils.date.Date, term_dt_or_tenor: financepy.utils.date.Date | str, fixed_leg_type: financepy.utils.global_types.SwapTypes, fixed_cpn: float, fixed_freq_type: financepy.utils.frequency.FrequencyTypes, fixed_dc_type: financepy.utils.day_count.DayCountTypes, notional: float = 1000000, payment_lag: int = 0, float_spread: float = 0.0, float_freq_type: financepy.utils.frequency.FrequencyTypes = <FrequencyTypes.ANNUAL: 1>, float_dc_type: financepy.utils.day_count.DayCountTypes = <DayCountTypes.THIRTY_E_360: 2>, cal_type: financepy.utils.calendar.CalendarTypes = <CalendarTypes.WEEKEND: 2>, bd_type: financepy.utils.calendar.BusDayAdjustTypes = <BusDayAdjustTypes.FOLLOWING: 2>, dg_type: financepy.utils.calendar.DateGenRuleTypes = <DateGenRuleTypes.BACKWARD: 2>)
Class for managing overnight index rate swaps (OIS) and Fed Fund swaps.
This is a contract in which a fixed payment leg is exchanged for a payment
which pays the rolled-up overnight index rate (OIR). There is no exchange
of par. The contract is entered into at zero initial cost.
NOTE: This class is almost identical to IborSwap but will possibly
deviate as distinctions between the two become clear to me. If not they
will be converged (or inherited) to avoid duplication.
The contract lasts from a start date to a specified maturity date.
The fixed cpn is the OIS fixed rate for the corresponding tenor which is
set at contract initiation.
The floating rate is not known fully until the end of each payment period.
It's calculated at the contract maturity and is based on daily observations
of the overnight index rate which are compounded according to a specific
convention. Hence the OIS floating rate is determined by the history of the
OIS rates.
In its simplest form, there is just one fixed rate payment and one floating
rate payment at contract maturity. However when the contract becomes longer
than one year the floating and fixed payments become periodic, usually with
annual exchanges of cash.
The value of the contract is the NPV of the two cpn streams. Discounting
is done on the OIS curve which is itself implied by the term structure of
market OIS rates.
Methods
value
value(self, value_dt: financepy.utils.date.Date, ois_curve: financepy.market.curves.discount_curve.DiscountCurve, first_fixing_rate=None)
Value the interest rate swap on a value date given a single Ibor
discount curve.
pv01
pv01(self, value_dt, discount_curve)
Calculate the value of 1 basis point cpn on the fixed leg.
swap_rate
swap_rate(self, value_dt, ois_curve, first_fixing_rate=None)
Calculate the fixed leg cpn that makes the swap worth zero.
If the valuation date is before the swap payments start then this
is the forward swap rate as it starts in the future. The swap rate
is then a forward swap rate and so we use a forward discount
factor. If the swap fixed leg has begun then we have a spot
starting swap.
print_fixed_leg_pv
print_fixed_leg_pv(self)
Prints the fixed leg amounts without any valuation details. Shows
the dates and sizes of the promised fixed leg flows.
print_float_leg_pv
print_float_leg_pv(self)
Prints the fixed leg amounts without any valuation details. Shows
the dates and sizes of the promised fixed leg flows.
print_payments
print_payments(self)
Prints the fixed leg amounts without any valuation details. Shows
the dates and sizes of the promised fixed leg flows.
Generated automatically from the FinancePy source code.
Do not edit this file manually.