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

[amibroker] Re: AmiBroker 4.58.0 BETA released



PureBytes Links

Trading Reference Links




Hi, all:
 
When I plot portfolio equity using the portfolio indicator 
builder formula below, the max system drawdown (MDD) does not agree with the MDD 
reported in the trade report. The disagreement could be many percentage points 
off. To verify, run a portfolio backtest on any of your favorite systems, then 
place your cursor anywhere on the graph and scroll until you find the max DD 
shown in the title (it could be early even though the DD's look small since 
equity in the early dates is much smaller than the later dates). Compare with 
the MDD reported in your trade report. The same is true for the Long MDD and the 
Short MDD. Any ideas why this may be? Here's the formula:
 
eq = Foreign(<FONT 
color=#ff00ff>"~~~EQUITY", <FONT 
color=#ff00ff>"C"<FONT 
color=#000000>); cash = Foreign<FONT 
color=#000000>("~~~EQUITY"<FONT 
color=#000000>, <FONT 
color=#ff00ff>"L"<FONT 
color=#000000>); dr = eq - <FONT 
color=#0000ff>Highest<FONT 
face="Courier New">(eq); <FONT 
color=#000000>GraphZOrder=<FONT 
color=#ff6820>1<FONT 
color=#000000>; LongEq=Foreign<FONT 
color=#000000>("~~~Equity"<FONT 
color=#000000>,<FONT 
color=#ff00ff>"O"<FONT 
color=#000000>); ShortEq=Foreign<FONT 
color=#000000>("~~~Equity"<FONT 
color=#000000>,<FONT 
color=#ff00ff>"H"<FONT 
color=#000000>); ddl=Longeq-<FONT 
color=#0000ff>Highest<FONT 
face="Courier New">(Longeq); dds=Shorteq-<FONT 
color=#0000ff>Highest<FONT 
face="Courier New">(Shorteq); <FONT 
color=#000000>GraphXSpace=<FONT 
color=#ff6820>1<FONT 
color=#000000>; Plot<FONT 
color=#000000>(eq/1000, 
"\nPortfolio Equity/1000", 
colorBlue, <FONT 
color=#000000>styleLine|<FONT 
color=#000000>styleThick<FONT 
face="Courier New">); <FONT 
color=#0000ff>Plot(dr/<FONT 
color=#ff6820>1000,<FONT 
color=#ff00ff>"   Portfolio DD/1000   "<FONT 
color=#000000>,colorBlue<FONT 
color=#000000>,<FONT 
color=#000000>styleArea<FONT 
face="Courier New">); <FONT 
color=#0000ff>Plot(<FONT 
color=#ff6820>100*dr/eq, <FONT 
color=#ff00ff>"    %Portfolio DD   "<FONT 
color=#000000>, colorBlue, 
styleArea<FONT 
face="Courier New">) ; <FONT 
color=#0000ff>Plot(LongEq/<FONT 
color=#ff6820>1000, <FONT 
color=#ff00ff>"\nLong 
Equity/1000      "<FONT 
color=#000000>,colorGreen<FONT 
color=#000000>,styleLine<FONT 
color=#000000>|<FONT 
color=#000000>styleThick<FONT 
face="Courier New">); <FONT 
color=#0000ff>Plot(ddl/<FONT 
color=#ff6820>1000,<FONT 
color=#ff00ff>"   Long Eqty DD/1000"<FONT 
color=#000000>,colorGreen<FONT 
color=#000000>,<FONT 
color=#000000>styleNoLine<FONT 
face="Courier New">); <FONT 
color=#0000ff>Plot(<FONT 
color=#ff6820>100*ddl/Longeq,<FONT 
color=#ff00ff>"    %Long Eqty DD "<FONT 
color=#000000>,colorGreen<FONT 
color=#000000>,<FONT 
color=#000000>styleNoLine<FONT 
face="Courier New">); <FONT 
color=#0000ff>Plot(ShortEq/<FONT 
color=#ff6820>1000,<FONT 
color=#ff00ff>"\nShort 
Equity/1000      "<FONT 
color=#000000>,colorRed<FONT 
color=#000000>,styleLine<FONT 
color=#000000>|<FONT 
color=#000000>styleThick<FONT 
face="Courier New">); <FONT 
color=#0000ff>Plot(dds/<FONT 
color=#ff6820>1000,<FONT 
color=#ff00ff>"     Short Eqty DD/1000"<FONT 
color=#000000>,colorRed<FONT 
color=#000000>,<FONT 
color=#000000>styleNoLine<FONT 
face="Courier New">); <FONT 
color=#0000ff>Plot(<FONT 
color=#ff6820>100*dds/Shorteq,<FONT 
color=#ff00ff>"    %Short Eqty DD"<FONT 
color=#000000>,colorRed<FONT 
color=#000000>,<FONT 
color=#000000>styleNoLine<FONT 
color=#000000>); 
<FONT 
face="Courier New"> 
Thanks,
 
Al Venosa
 
---Outgoing mail is certified Virus 
Free.Checked by AVG anti-virus system (<A 
href="">http://www.grisoft.com).Version: 6.0.716 / 
Virus Database: 472 - Release Date: 
7/5/2004


Check AmiBroker web page at:
http://www.amibroker.com/

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html








Yahoo! Groups Sponsor


  ADVERTISEMENT 












Yahoo! Groups Links
To visit your group on the web, go to:http://groups.yahoo.com/group/amibroker/ 
To unsubscribe from this group, send an email to:amibroker-unsubscribe@xxxxxxxxxxxxxxx 
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.