quantlib.instruments.assetswap.

AssetSwap

class AssetSwap(bool pay_bond_coupon, Bond bond, Real bond_clean_price, IborIndex ibor_index, Spread spread, Schedule float_schedule=Schedule.__new__(Schedule), DayCounter floating_day_counter=DayCounter(), bool par_asset_swap=True, Real gearing=1.0, Real non_par_repayment=Null[Real](), Date deal_maturity=Date())

Bases: Swap

Attributes:
bond_leg
error_estimate

Real: error estimate on the NPV when available

fair_clean_price
fair_non_par_repayment
fair_spread
floating_leg
floating_leg_BPS
floating_leg_NPV
is_expired

bool: whether the instrument might have value greater than zero.

maturity_date

The maturity date of the swap.

net_present_value

The net present value of the instrument.

npv

A shortcut to the net_present_value property.

start_date

The start date of the swap.

valuation_date

Date: the date the net present value refers to.

Methods

endDiscounts(self, Size j)

The discount factor at the end of the j-th leg of the swap.

leg(self, Size i)

The i-th leg of the swap.

leg_BPS(self, Size j)

The basis-point sensitivity of the j-th leg of the swap.

leg_NPV(self, Size j)

The net present value of the j-th leg of the swap.

npv_date_discount(self)

The discount factor at the NPV date.

set_pricing_engine(self, PricingEngine engine)

Sets the pricing engine to be used.

startDiscounts(self, Size j)

The discount factor at the start of the j-th leg of the swap.