Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Need An Investment Calculator
Message
From
19/06/2006 12:52:44
 
General information
Forum:
Politics
Category:
Other
Miscellaneous
Thread ID:
01129985
Message ID:
01130010
Views:
19
>Ok, here's my code. It is close to what I found here
>http://www.moneychimp.com/articles/finworks/fmbasinv.htm
>
>but not exact. Not sure where I'm off
>
>
>CLEAR
>
>LOCAL nAmount, nRate, nTotalPeriods, nEarning, nTotVal
>
>nAmount 	= 7669.04
>nRate 		= .08 / 12
>nPeriods		= 12 * 10  && 10 years
>
>? "Investment Amount: " + ALLTRIM(TRANSFORM(nAmount, "@R $$$,$$$,$$$.99"))
>? "Interest Rate:     " + TRANSFORM(nRate, "@R .99")
>? "Periods:            " + TRANSFORM(nPeriods)
>?
>?
>
>? "Period         Amount         Earned"
>? "-------------------------------------"
>
>FOR nPeriod = 1 TO nPeriods
>
>	nEarning = nAmount * nRate
>	nAmount = nAmount + nEarning
>
>	? PADL(nPeriod , 5, " "), TRANSFORM(nAmount, "@R $$$,$$$,$$$.99"), TRANSFORM(nEarning, "@R $$$,$$$,$$$.99")
>
>ENDFOR
>
>?
>? "Value of investment: " + ALLTRIM(TRANSFORM(nAmount, "@R $$$,$$$,$$$.99"))
>
Yes, that should be reasonably accurate for interest compounded monthly. An alternative calculation would be using days in month / days in year * annual rate to get the monthly rate. This would give slightly different results.

Regards,
Jim
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform