relife.discounting.GeneralizedHyperbolicDiscounting
relife.discounting.GeneralizedHyperbolicDiscounting¶
- class relife.discounting.GeneralizedHyperbolicDiscounting[source]¶
Bases:
relife.discounting.Discount
Generalized hyperbolic discounting model.
The generalized hyperbolic discount factor is:
\[D(x) = \dfrac{1}{(1 + \beta x)^\eta}\]where \(\beta,\eta >0\).
Methods
The annuity factor.
The discount factor.
The discount rate.
- classmethod factor(t: numpy.ndarray, beta: numpy.ndarray = 0, eta: numpy.ndarray = 1) 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, eta: numpy.ndarray = 1) 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, eta: numpy.ndarray = 1) 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]\).