Message Boards Message Boards

0
|
1924 Views
|
0 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Error in converting Annuity to Cashflow

Posted 2 years ago

In converting an Annuity to a Cashflow, I believe the initial payment is being handled incorrectly. Here is code that demonstrates that:

(* Annuity with an initial payment and then 5 payments *)

(* Present value *)

TimeValue[Annuity[{pmt, {init}}, 5], 0, 0]

(* init+5 pmt *)

(* value before the first period *)

TimeValue[Annuity[{pmt, {init}}, 0], 0, 0]

(* init *)

(* value after the first period *)

TimeValue[Annuity[{pmt, {init}}, 1], 0, 1]

(* init+pmt *)

(* convert the annuity to a cashflow *)

cf = Cashflow[Annuity[{pmt, {init}}, 5]]

(* Cashflow[{{1,init+pmt},{2,pmt},{3,pmt},{4,pmt},{5,pmt}}] *)

(* We have lost the fact that the initial payment was made first *)

When I went to post this on Mathematica StackExchange I found an earlier post from 6 years ago. If I am correct about this being a bug, it would result in a wrong result.

Why hasn't this been fixed?

POSTED BY: David Keith
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract