# [R-SIG-Finance] Calculating FV of a Uniform Stream using TVM

R. Michael Weylandt michael.weylandt at gmail.com
Wed Oct 3 01:31:49 CEST 2012

```On Wed, Oct 3, 2012 at 12:21 AM, Nitin Juneja <nitin.juneja at gmail.com> wrote:
> I am perplexed. The problem I am working is,
>
> Question : How much money must Carol deposit every year starting 1 year
> from now at 5.5 % per year in order to accumulate \$6000 seven years from
> now?
>
> My correct solution is :
>
>> 6000/usfv(5.5,7)
> [1] 725.7865
>
> I think this should also work... but does not:
>> tvm(i=5.5,n=7,fv=-6000,pmt=NA,pyr=1)
>
> Time Value of Money model
>
>    I% #N PV    FV    PMT Days #Adv P/YR C/YR
> 1 5.5  7  0 -6000 687.95  360    0    1    1
>
> I am getting a difference PMT amount. Does anyone have an insight in why I
> a getting the difference
>

Hi Nitin,

This is the feel of a homework assignment and this --  and all the
R-help lists -- have a no homework policy (too many academics involved
I suppose! R was, after all, originally teaching software) so we can't
really give you too much help here.

To answer your question properly, we'd need to see a reproducible example

http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example

In particular giving the origin of the functions tvm() and usfv().

Without those, things which immediately come to mind: i) simple vs.
compounding; ii) frequency of compounding; iii) arithmetic vs
geometric returns. (These are all of course related in some sense)
I've played with the numbers a bit and the discrepancy is likely in
that vein.

Cheers,
Michael

```