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

RE: [amibroker] compound interest



PureBytes Links

Trading Reference Links




check 
Fred Tonetti's equity curve code - he's got some stuff in there you might find 
useful.
<FONT face=Arial color=#0000ff 
size=2> 
<FONT face=Arial color=#0000ff 
size=2>d

  
  <FONT 
  face=Tahoma size=2>-----Original Message-----From: Sidney Kaiser 
  [mailto:s9kaiser@xxxxxxxxxxx] Sent: Monday, December 08, 2003 1:49 
  PMTo: AmiBroker@xxxxxxxxxxxxxxxSubject: [amibroker] 
  compound interestNo nibbles on help for this so 
  far.It seems to me that the time periods have to be bar by bar to 
  generate the interest curve so here is my current attempt which always 
  returns a single value, 1.Where should I go from 
  here?Sid// Compound Interestinterest_rate = 
  5;     // %//P = 1;     // 
  principal amountr = interest_rate/100;//t = 10;    // 
  years//tbar = t/260;A[0] = 1; /*Initialize the first element 
  here*/t[0] = 0;for(i = 1; i<BarCount; 
  i++){    A[i] = A[i-1]*exp(r*t[i]/260);}//A = P 
  * exp(r*t);Plot(A, "Compound Interest", colorBlack, styleLine);  
  Send 
  BUG REPORTS to bugs@xxxxxxxxxxxxxSend SUGGESTIONS to 
  suggest@xxxxxxxxxxxxx-----------------------------------------Post 
  AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page: <A 
  href="">http://groups.yahoo.com/group/amiquote/messages/)--------------------------------------------Check 
  group FAQ at: <A 
  href="">http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
  Your use of Yahoo! Groups is subject to the <A 
  href="">Yahoo! Terms of Service. 







Yahoo! Groups Sponsor












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 the Yahoo! Terms of Service.