[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] Re: compound interest



PureBytes Links

Trading Reference Links

258.3 ?! hmmm ... let's see 52 weeks * 5 days / week = 260.  I guess 
there are only 1.7 market holidays / year.

--- In amibroker@xxxxxxxxxxxxxxx, Sidney Kaiser <s9kaiser@xxxx> wrote:
> I finally got my little formula for compound interest working with 
the For 
> loop.  This is not the best way to calculate compound interest ( 
see the 
> simple non looping formula from Bruce Robinson ) but it makes a 
nice simple 
> example  for looping.  258.3 is the approximate number of trading 
days in a 
> year.
> 
> Sid
> 
> // Compound Interest
> 
> interest_rate = 5;  // percent
> r = interest_rate/100;
> 
> A[0] = 1;
> for(i = 1; i < BarCount;  i++)
> {
>     A[i] = exp(r*(i/258.3));
> }
> 
> Plot(A, "Compound Interest", colorBlack, styleLine);  
> 
> 
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.545 / Virus Database: 339 - Release Date: 11/27/2003


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/GHeqlB/TM
---------------------------------------------------------------------~->

Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/