BaseLegMtm#

class rateslib.legs.BaseLegMtm(*args, fx_fixings=NoInput.blank, alt_currency=NoInput.blank, alt_notional=NoInput.blank, **kwargs)#

Bases: BaseLeg

Abstract base class with common parameters for all LegMtm subclasses.

Parameters:
  • args (dict) – Required positional args to BaseLeg.

  • fx_fixings (float, Dual, Dual2 or list or Series of such) – Define the known FX fixings for each period which affects the mark-the-market (MTM) notional exchanges after each period. If not given, or only some FX fixings are given, the remaining unknown fixings will be forecast by a provided FXForwards object later. If a Series must be indexed by the date of the notional exchange considering payment_lag_exchange.

  • alt_currency (str) – The alternative reference currency against which FX fixings are measured for MTM notional exchanges (3-digit code).

  • alt_notional (float) – The notional expressed in the alternative currency which will be used to determine the notional for this leg using the fx_fixings as FX rates.

  • kwargs (dict) – Required keyword args to BaseLeg.

See also

FixedLegExchangeMtm

Create a fixed leg with notional and Mtm exchanges.

FloatLegExchangeMtm

Create a floating leg with notional and Mtm exchanges.

Attributes Summary

fx_fixings

FX fixing values used for consecutive periods.

notional

Methods Summary

analytic_delta([curve, disc_curve, fx, base])

Return the analytic delta of the Leg via summing all periods.

cashflows([curve, disc_curve, fx, base])

Return the properties of the Leg used in calculating cashflows.

npv(curve[, disc_curve, fx, base, local])

Return the NPV of the Leg via summing all periods.

Attributes Documentation

fx_fixings#

FX fixing values used for consecutive periods.

Type:

list

notional#

Methods Documentation

analytic_delta(curve=NoInput.blank, disc_curve=NoInput.blank, fx=NoInput.blank, base=NoInput.blank)#

Return the analytic delta of the Leg via summing all periods.

For arguments see BasePeriod.analytic_delta().

cashflows(curve=NoInput.blank, disc_curve=NoInput.blank, fx=NoInput.blank, base=NoInput.blank)#

Return the properties of the Leg used in calculating cashflows.

For arguments see BasePeriod.cashflows().

npv(curve, disc_curve=NoInput.blank, fx=NoInput.blank, base=NoInput.blank, local=False)#

Return the NPV of the Leg via summing all periods.

For arguments see BasePeriod.npv().