average_rate#

rateslib.curves.average_rate(effective, termination, convention, rate)#

Return the geometric, 1 calendar day, average rate for the rate in a period.

This is used for approximations usually in combination with floating periods.

Parameters:
  • effective (datetime) – The effective date of the rate.

  • termination (datetime) – The termination date of the rate.

  • convention (str) – The day count convention of the curve rate.

  • rate (float, Dual, Dual2) – The rate to decompose to average, in percentage terms, e.g. 0.04 = 4% rate.

Returns:

tuple

Return type:

The rate, the 1-day DCF, and the number of calendar days