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

[amibroker] Calculation of Equity and Drawdowns - trying to understand what's going on..


  • To: "_amibroker_yahoo" <tj@xxxxxxxxxxxxx>
  • Subject: [amibroker] Calculation of Equity and Drawdowns - trying to understand what's going on..
  • From: "dingo" <dingo@xxxxxxxxxx>
  • Date: Fri, 16 May 2003 14:30:22 -0700
  • Title: Message

PureBytes Links

Trading Reference Links




Please help me understand how Amibroker calculates 
equity and 
drawdowns!!-----------------------------------------------------------------------------------Here 
are my settings:Settings:   Delay = 1, Open for all 
signals                 
No interest, no commissions,  drawdown figures based on: worst 
case-----------------------------------------------------------------------------------<FONT 
face=Arial size=2>And here is the Afl Used to produce the csv data which is 
below the formula:
{buy/sell etc. goes here}
E = 
Equity();Filter=1;BIR      = 
IIf(Status("BarInRange") > 0, 1, 0);CurEq    = 
Equity();MaxEq    = 
Highest(CurEq);CurDD    = IIf(BIR, 100 * (MaxEq - CurEq) 
/ MaxEq, 0);MaxDD    = 
Highest(CurDD);AddColumn(Buy,"Buy",1.0);AddColumn(Sell,"Sell",1.0);AddColumn(Short,"Short",1.0);AddColumn(Cover,"Cover",1.0);AddColumn(O, 
"Open",1.2);AddColumn(L, "Low",1.2);AddColumn(H, 
"High",1.2);AddColumn(C, 
"Close",1.2);AddColumn(MaxEq,"MaxEq",1.2);AddColumn(CurEq,"Equity()",1.2);AddColumn(-CurDD,"CDD%",1.2);AddColumn(-MaxDD,"MDD%",1.2);
 

<TABLE  cellSpacing=0 
cellPadding=0 width=670 border=0 x:str>
  
  <COL  
  width=46>
  <COL  
  width=97>
  <COL  
  width=31>
  <COL  
  width=32>
  <COL  
  width=41>
  <COL  
  width=44>
  <COL  
  width=41>
  <COL  
  span=2 width=39>
  <COL  
  width=42>
  <COL  
  span=2 width=64>
  <COL  
  width=44>
  <COL  
  width=46>
  
  
    <TD class=xl27 
     
    width=46 height=17><FONT face=Arial 
    size=2>Ticker
    <TD class=xl28 
     
    width=97>Date/Time
    <TD class=xl29 
     
    width=31>Buy
    <TD class=xl29 
     
    width=32>Sell
    <TD class=xl29 
     
    width=41>Short
    <TD class=xl29 
     
    width=44>Cover
    <TD class=xl30 
     
    width=41>Open
    <TD class=xl30 
     
    width=39>Low
    <TD class=xl30 
     
    width=39>High
    <TD class=xl30 
     
    width=42>Close
    <TD class=xl30 
     
    width=64>MaxEq
    <TD class=xl30 
     
    width=64>Equity()
    <TD class=xl30 
     
    width=44>CDD%
    <TD class=xl30 
     
    width=46>MDD%
  
    <TD class=xl31 
     
    height=17>AD
    <TD class=xl32 
     
    x:num="37377">05/01/2002
    <TD class=xl33 
     
    x:num>0
    <TD class=xl33 
     
    x:num>0
    <TD class=xl33 
     
    x:num>1
    <TD class=xl33 
     
    x:num>0
    <TD class=xl34 
     
    x:num>43.40
    <TD class=xl34 
     
    x:num>43.00
    <TD class=xl34 
     
    x:num>44.61
    <TD class=xl34 
     
    x:num>44.51
    <TD class=xl34 
     
    x:num="10000">10,000.00
    <TD class=xl34 
     
    x:num="10000">10,000.00
    <TD class=xl34 
     
    x:num>0.00
    <TD class=xl34 
     
    x:num>0.00
  
    <TD class=xl31 
     
    height=17>AD
    <TD class=xl32 
     
    x:num="37378">05/02/2002
    <TD class=xl33 
     
    x:num>0
    <TD class=xl33 
     
    x:num>0
    <TD class=xl33 
     
    x:num>0
    <TD class=xl33 
     
    x:num>0
    <TD class=xl34 
     
    x:num>44.46
    <TD class=xl34 
     
    x:num>44.19
    <TD class=xl34 
     
    x:num>45.19
    <TD class=xl34 
     
    x:num>44.48
    <TD class=xl34 
     
    x:num="10000">10,000.00
    <TD class=xl34 
     
    x:num="10000">10,000.00
    <TD class=xl34 
     
    x:num>0.00
    <TD class=xl34 
     
    x:num>0.00
  
    <TD class=xl31 
     
    height=17>AD
    <TD class=xl32 
     
    x:num="37379">05/03/2002
    <TD class=xl33 
     
    x:num>0
    <TD class=xl33 
     
    x:num>0
    <TD class=xl33 
     
    x:num>0
    <TD class=xl33 
     
    x:num>0
    <TD class=xl34 
     
    x:num>44.73
    <TD class=xl34 
     
    x:num>44.67
    <TD class=xl34 
     
    x:num>45.19
    <TD class=xl34 
     
    x:num>45.07
    <TD class=xl34 
     
    x:num="10000">10,000.00
    <TD class=xl34 
     
    x:num="9939.27">9,939.27
    <TD class=xl34 
     
    x:num>-0.61
    <TD class=xl34 
     
    x:num>-0.61
  
    <TD class=xl31 
     
    height=17>AD
    <TD class=xl32 
     
    x:num="37382">05/06/2002
    <TD class=xl33 
     
    x:num>0
    <TD class=xl33 
     
    x:num>0
    <TD class=xl33 
     
    x:num>0
    <TD class=xl33 
     
    x:num>0
    <TD class=xl34 
     
    x:num>45.10
    <TD class=xl34 
     
    x:num>44.71
    <TD class=xl34 
     
    x:num>45.50
    <TD class=xl34 
     
    x:num>44.71
    <TD class=xl34 
     
    x:num="10000">10,000.00
    <TD class=xl34 
     
    x:num="9856.05">9,856.05
    <TD class=xl34 
     
    x:num>-1.44
    <TD class=xl34 
     
    x:num>-1.44
  
    <TD class=xl31 
     
    height=17>AD
    <TD class=xl32 
     
    x:num="37383">05/07/2002
    <TD class=xl33 
     
    x:num>0
    <TD class=xl33 
     
    x:num>0
    <TD class=xl33 
     
    x:num>0
    <TD class=xl33 
     
    x:num>0
    <TD class=xl34 
     
    x:num>44.70
    <TD class=xl34 
     
    x:num>44.60
    <TD class=xl34 
     
    x:num>45.36
    <TD class=xl34 
     
    x:num>45.17
    <TD class=xl34 
     
    x:num="10000">10,000.00
    <TD class=xl34 
     
    x:num="9946.02">9,946.02
    <TD class=xl34 
     
    x:num>-0.54
    <TD class=xl34 
     
    x:num>-1.44
  
    <TD class=xl31 
     
    height=17>AD
    <TD class=xl32 
     
    x:num="37384">05/08/2002
    <TD class=xl33 
     
    x:num>0
    <TD class=xl33 
     
    x:num>0
    <TD class=xl33 
     
    x:num>0
    <TD class=xl33 
     
    x:num>0
    <TD class=xl34 
     
    x:num>45.32
    <TD class=xl34 
     
    x:num>45.00
    <TD class=xl34 
     
    x:num>45.79
    <TD class=xl34 
     
    x:num>45.79
    <TD class=xl34 
     
    x:num="10000">10,000.00
    <TD class=xl34 
     
    x:num="9806.57">9,806.57
    <TD class=xl34 
     
    x:num>-1.93
    <TD class=xl34 
     
    x:num>-1.93
  
    <TD class=xl35 
     
    height=17>AD
    <TD class=xl36 
     
    x:num="37385">05/09/2002
    <TD class=xl37 
     
    x:num>0
    <TD class=xl37 
     
    x:num>0
    <TD class=xl37 
     
    x:num>0
    <TD class=xl37 
     
    x:num>0
    <TD class=xl38 
     
    x:num>45.84
    <TD class=xl38 
     
    x:num>44.80
    <TD class=xl38 
     
    x:num>45.84
    <TD class=xl38 
     
    x:num>44.80
    <TD class=xl38 
     
    x:num="10000">10,000.00
    <TD class=xl38 
     
    x:num="9689.61">9,689.61
    <TD class=xl38 
     
    x:num>-3.10
    <TD class=xl38 
     
    x:num>-3.10
  
    <TD class=xl31 
     
    height=17>AD
    <TD class=xl32 
     
    x:num="37386">05/10/2002
    <TD class=xl33 
     
    x:num>0
    <TD class=xl33 
     
    x:num>0
    <TD class=xl33 
     
    x:num>0
    <TD class=xl33 
     
    x:num>1
    <TD class=xl34 
     
    x:num>44.84
    <TD class=xl34 
     
    x:num>43.76
    <TD class=xl34 
     
    x:num>44.84
    <TD class=xl34 
     
    x:num>43.88
    <TD class=xl34 
     
    x:num="10000">10,000.00
    <TD class=xl34 
     
    x:num="9914.53">9,914.53
    <TD class=xl34 
     
    x:num>-0.85
    <TD class=xl34 
     
    x:num>-3.10
  
    <TD class=xl31 
     
    height=17>AD
    <TD class=xl32 
     
    x:num="37389">05/13/2002
    <TD class=xl33 
     
    x:num>0
    <TD class=xl33 
     
    x:num>0
    <TD class=xl33 
     
    x:num>0
    <TD class=xl33 
     
    x:num>0
    <TD class=xl34 
     
    x:num>43.88
    <TD class=xl34 
     
    x:num>43.51
    <TD class=xl34 
     
    x:num>44.09
    <TD class=xl34 
     
    x:num>43.90
    <TD class=xl34 
     
    x:num="10130.46">10,130.46
    <TD class=xl34 
     
    x:num="10130.46">10,130.46
    <TD class=xl34 
     
    x:num>0.00
    <TD class=xl34 
     
    x:num>-3.10
  
    <TD 
     
    height=17>
    <TD class=xl24 
    ><FONT 
      face=Arial size=2>
    <TD class=xl26 
    ><FONT 
      face=Arial size=2>
    <TD class=xl26 
    ><FONT 
      face=Arial size=2>
    <TD class=xl26 
    ><FONT 
      face=Arial size=2>
    <TD class=xl26 
    ><FONT 
      face=Arial size=2>
    <TD class=xl25 
    ><FONT 
      face=Arial size=2>
    <TD class=xl25 
    ><FONT 
      face=Arial size=2>
    <TD class=xl25 
    ><FONT 
      face=Arial size=2>
    <TD class=xl25 
    ><FONT 
      face=Arial size=2>
    <TD class=xl25 
    ><FONT 
      face=Arial size=2>
    <TD class=xl25 
    ><FONT 
      face=Arial size=2>
    <TD class=xl25 
    ><FONT 
      face=Arial size=2>
    <TD class=xl25 
    ><FONT 
      face=Arial size=2>
  
    <TD 
     
    height=17>
    <TD class=xl24 
    ><FONT 
      face=Arial size=2>224.921 shares
    <TD class=xl26 
    >
    <TD class=xl26 
    >
    <TD class=xl26 
    >
    <TD class=xl26 
    >
    <TD class=xl25 
    >
    <TD class=xl25 
    >
    <TD class=xl25 
    >
    <TD class=xl25 
    >
       
       
    <TD class=xl25 
    >
    <TD class=xl25 
    >
    <TD class=xl25 
    >
    <TD class=xl25 
    >
 
The trade in the above is a Short and the results 
are from an Exploration.
 
The line I'm interested in is the yellow one.  
How did the equity() calc come up with 9,689.61?  
 
Thanks for any/all explanations!!
 
d






Yahoo! Groups Sponsor


  ADVERTISEMENT 









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.