tmval.Bond.clean

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

Calculates the clean value. The argument tprac can be toggled to switch between the theoretical, semipractical, or practical clean value.

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’, ‘semipractical’, or ‘practical’ clean value.

Returns

The clean value.

Return type

float