relife.discounting.Discount

relife.discounting.Discount

class relife.discounting.Discount[source]

Bases: abc.ABC

Generic discount function.

References

1

Van der Weide, J. A. M., & Van Noortwijk, J. M. (2008). Renewal theory with exponential and hyperbolic discounting. Probability in the Engineering and Informational Sciences, 22(1), 53-74.

Methods

annuity_factor

The annuity factor.

factor

The discount factor.

rate

The discount rate.

abstract classmethod factor(t: numpy.ndarray, *discount_args: numpy.ndarray) 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\).

abstract classmethod rate(t: numpy.ndarray, *discount_args: numpy.ndarray) 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.

abstract classmethod annuity_factor(t: numpy.ndarray, *discount_args: numpy.ndarray) 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]\).