tmval.Rate.convert_rate

Rate.convert_rate(pattern, freq: float = None, interval: float = None)[source]

Converts the rate to the desired pattern.

The compound patterns - Effective Interest, Effective Discount, Nominal Interest, Nominal Discount, and Force of Interest can be converted to each other.

Simple Interest can be converted to another Simple Interest with a different interval. Simple Discount can be converted to another Simple Discount with a different interval. Simple Interest and Simple Discount cannot be converted to each other because they do not correspond to the same accumulation function.

Compound patterns cannot be converted to simple patterns.

Parameters
  • pattern (str) – The pattern to which you want to convert the rate.

  • freq (float) – The compounding frequency, times per year.

  • interval (float) – The effective interval, in years.

Returns

A rate object.

Return type

Rate