Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Need An Investment Calculator
Message
 
To
19/06/2006 12:52:44
General information
Forum:
Politics
Category:
Other
Miscellaneous
Thread ID:
01129985
Message ID:
01130013
Views:
17
>>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,

If I am not mistaken all banks use 30 days for a month and 300 days for year for their calculations, so monthly rate must me 1/10th of the anual one.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform