tmval.Payments.dw_approx¶
-
tmval.value.Payments.
dw_approx
(self, a: float = None, b: float = None, w_t: float = None, k_approx: bool = False, k: float = 0.5, annual: bool = False) → tmval.rate.Rate¶ Calculates the approximate dollar-weighted yield rate by standardizing the investment time to 1:
Where A is the beginning balance, I is interest earned, and the Cs are the contributions. When k_approx is set to true, k is assumed to be a fixed constant within the investment window:
The default value for k is 1/2, simplifying the above expression to:
j approx frac{2I}{A + B - I}
Where B is the withdrawal balance. When arguments a, b, and w_t (corresponding to A, B, and the the withdrawal time) are not provided, a is assumed to be the first payment in the parent object, and b is calculated to be the last.
- Parameters
a (float) – The initial balance.
b (float) – The withdrawal balance.
w_t (float) – The withdrawal time.
k_approx (bool) – Whether you want to use the k-approximation formula.
k (float) – The value for k in the k-approximation formula, defaults to .5.
annual (bool) – Whether you want the results annualized.
- Returns
The approximate dollar-weighted yield rate.
- Return type