tmval.Bond.dirty

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

Calculates the dirty value of a bond. It can be toggled to switch between theoretical and practical dirty values.

Parameters
  • t (float) – The valuation time.

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

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

Returns

The dirty value.

Return type

float