Bug intoduced in (8.0?) persisting through version 13.2
If we use TimeValue to look at the PV of an Annuity with initial payment:
TimeValue[ Annuity[{ 1, { p, 0 } }, 2], r ] // Apart
$p + \frac{1}{(1+r)^2} + \frac{1}{1+r}$
The initial payment p is taken to be at time 0. However if we take the Cashflow of the same Annuity and look at the PV of that Cashflow:
TimeValue[ Cashflow @ Annuity[{ 1, { p, 0 } }, 2], r ] // Apart
$\frac{1}{(1+r)^2} + \frac{1+p}{1+r}$
Suddenly p is now taken to be at time 1 instead of 0. Is this a bug?
Out[18]above should beCashflow[{{0, p}, {1, 1}, {2, 1}}]– Mike Honeychurch Mar 17 '15 at 05:35Cashflowto make the payments and times more visible (as suggested by Mike). Then using the functionality shown here you can always construct complicated cashflows by adding and subtracting individual cashflows, e.g.cashflow = Cashflow[ Annuity[ 1, 5] ] + Cashflow[ {p} ]. – gwr Feb 27 '17 at 12:51CashFlowis far from being the most complex function. That's why this bug doesn't make sense. – asterix314 Oct 12 '22 at 16:08