Approximate Dollar-Weighted Yield Rate¶
Sometimes, we would like to approximate the dollar-weighted yield rate. One such approximation is to set the investment term to 1:
Where is the total interest earned, is the beginning balance, the Cs are the contributions, and the ts are contribution times as fractions of the unit investment time. We can further simplify things by assuming that each contribution happens at a constant time within the unit interval:
Furthermore, if we assume , this once more simplifies to:
Examples¶
Suppose we make an investment of 10,000 at time 0 and 5,000 at time 1. If we withdraw 16,000 at time 2, what is the approximate dollar-weighted yield?
We can solve this problem by calling the dw_approx()
method of the Payments
class:
In [1]: from tmval import Payments
In [2]: pmts = Payments(
...: amounts=[10000, 5000, -16000],
...: times=[0, 1, 2]
...: )
...:
In [3]: print(pmts.dw_approx())
Pattern: Effective Interest
Rate: 0.08
Unit of time: 2 years
What if we use k-approximation? If we set k_approx=True
, k defaults to 1/2:
In [4]: from tmval import Payments
In [5]: pmts = Payments(
...: amounts=[10000, 5000, -16000],
...: times=[0, 1, 2]
...: )
...:
In [6]: print(pmts.dw_approx(k_approx=True))
Pattern: Effective Interest
Rate: 0.08
Unit of time: 2 years
What if we set k=3/4?
In [7]: from tmval import Payments
In [8]: pmts = Payments(
...: amounts=[10000, 5000, -16000],
...: times=[0, 1, 2]
...: )
...:
In [9]: print(pmts.dw_approx(k_approx=True, k=3/4))
Pattern: Effective Interest
Rate: 0.08888888888888889
Unit of time: 2 years