FinancePy

FinancePy API Reference

Equity Swap Leg

financepy.products.equity.equity_swap_leg

Classes

EquitySwapLeg

EquitySwapLeg(effective_dt: financepy.utils.date.Date, term_dt_or_tenor: financepy.utils.date.Date | str, leg_type: financepy.utils.global_types.SwapTypes, freq_type: financepy.utils.frequency.FrequencyTypes, accrual_dc_type: financepy.utils.day_count.DayCountTypes, strike: float, quantity: float = 1.0, payment_lag: int = 0, return_type: financepy.utils.global_types.ReturnTypes = <ReturnTypes.TOTAL_RETURN: 1>, cal_type: financepy.utils.calendar.CalendarTypes | list | tuple = <CalendarTypes.WEEKEND: 2>, bd_type: financepy.utils.calendar.BusDayAdjustTypes = <BusDayAdjustTypes.FOLLOWING: 2>, dg_type: financepy.utils.calendar.DateGenRuleTypes = <DateGenRuleTypes.BACKWARD: 2>, end_of_month: bool = False)
Class for managing the equity leg of an equity swap. An equity leg is a leg with a sequence of flows calculated according to an ISDA schedule and follows the economics of a collection of equity forward contracts.

Methods

generate_payment_dts

generate_payment_dts(self)
Generate the Equity leg payment dates and accrual factors. Similar to swap float leg, payment values can't be generated, as we do not have index curve, dividend curve and equity price.

value

value(self, value_dt: financepy.utils.date.Date, discount_curve: financepy.market.curves.discount_curve.DiscountCurve, index_curve: financepy.market.curves.discount_curve.DiscountCurve, dividend_curve: financepy.market.curves.discount_curve.DiscountCurve = None, current_price: float = None)
Value the equity leg with payments from an equity price, quantity, an index curve and an [optional] dividend curve. Discounting is based on a supplied discount curve as of the valuation date supplied. Each reset period is treated as an independent forward contract: PV_i = Q * S_0 * df_idx(0, t_{i-1}) * df_div(0, t_{i-1}) * df(0, t_i) * [1 / (df_idx(0, t_i) * df_div(0, t_i)) - 1] For the current (in-progress) period where t_{i-1} < value_dt <= t_i, the period-start equity price is known (current_price or strike), so we value it as a single forward from value_dt to t_i.

value_bug

value_bug(self, value_dt: financepy.utils.date.Date, discount_curve: financepy.market.curves.discount_curve.DiscountCurve, index_curve: financepy.market.curves.discount_curve.DiscountCurve, dividend_curve: financepy.market.curves.discount_curve.DiscountCurve = None, current_price: float = None)
Value the equity leg with payments from an equity price, quantity, an index curve and an [optional] dividend curve. Discounting is based on a supplied discount curve as of the valuation date supplied.

print_payment_amounts

print_payment_amounts(self)
Prints the payment dates, accrual factors, discount factors, cash amounts, their present value and their cumulative PV using the last valuation performed.

print_valuation

print_valuation(self)
Prints the valuation dates, accrual factors, discount factors, cash amounts, their present value and their cumulative PV using the last valuation performed.
Generated automatically from the FinancePy source code. Do not edit this file manually.