tmval.osi

tmval.growth.osi(beg_dt: datetime.datetime, end_dt: datetime.datetime, frac=True) → float[source]

Calculate the number of days using the ordinary simple interest or 30/360 rule. Set frac=True to return days as a percentage of year.

Parameters
  • beg_dt (datetime.datetime) – beginning date

  • end_dt (datetime.datetime) – ending date

  • frac (bool, optional) – whether you want the answer in number of days or fraction of a year, defaults to True

Returns

the number of days using the ordinary simple interest or 360 rule, or the percentage of year if frac=True

Return type

float