relife.discounting.ExponentialDiscounting
relife.discounting.ExponentialDiscounting¶
- class relife.discounting.ExponentialDiscounting[source]¶
Bases:
relife.discounting.Discount
Exponential discounting model.
The exponetial discount factor is:
\[D(x) = e^{-\delta x}\]where \(\delta\) is the rate.
Methods
The annuity factor.
The discount factor.
The discount rate.
- classmethod factor(t: numpy.ndarray, rate: 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, rate: 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, rate: 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]\).