tmval.Bond.accrued_interest

Bond.accrued_interest(t: float, gr: Union[float, tmval.rate.Rate] = None, tprac: str = 'theoretical') → float[source]

Calculates the accrued interest in a coupon payment. Can be toggled between the clean or practical values.

Parameters
  • t (float) – The valuation time.

  • gr (float, Rate) – The valuation yield, if pricing a bond at a different yield. Defaults to the current bond yield.

  • tprac (str) – Whether you want the ‘theoretical’ or ‘practical’ value.

Returns

The accrued interest.

Return type

float