relife.discounting.HyperbolicDiscounting

relife.discounting.HyperbolicDiscounting

class relife.discounting.HyperbolicDiscounting[source]

Bases: relife.discounting.Discount

Hyperbolic discounting model.

The hyperbolic discount factor is:

\[D(x) = \dfrac{1}{1 + \beta x}\]

where \(\beta>0\).

Methods

annuity_factor

The annuity factor.

factor

The discount factor.

rate

The discount rate.

classmethod factor(t: numpy.ndarray, beta: numpy.ndarray = 0) numpy.ndarray[source]

The discount factor.

Parameters
  • t (ndarray) – Time.

  • *discount_args (ndarray) – Extra arguments required by the discount model.

Returns

The discount factor evaluated at t.

Return type

ndarray

Notes

The discount factor evaluated at \(t\) that multiplies the reward to get the discounted reward \(D(t) \cdot y\).

classmethod rate(t: numpy.ndarray, beta: numpy.ndarray = 0) numpy.ndarray[source]

The discount rate.

Parameters
  • t (ndarray) – Time.

  • *discount_args (ndarray) – Extra arguments required by the discount model.

Returns

The discount rate evaluated at t.

Return type

ndarray

Notes

The discount rate evaluated at \(t\) is defined by:

\[r(t) = -\dfrac{D'(t)}{D(t)}\]

where \(D\) is the discount factor.

classmethod annuity_factor(t: numpy.ndarray, beta: numpy.ndarray = 0) numpy.ndarray[source]

The annuity factor.

Parameters
  • t (ndarray) – Time.

  • *discount_args (ndarray) – Extra arguments required by the discount model.

Returns

The annuity factor evaluated at t.

Return type

ndarray

Notes

The annuity factor at time \(t\) is defined by:

\[AF(t) = \int_0^t D(x) \mathrm{d}x\]

where \(D\) is the discount factor.

It is used to compute the equivalent annual cost of continuous discounted cash flows over the period \([0, t]\).