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

[amibroker] Re: Trade Analysis



PureBytes Links

Trading Reference Links

Chuck,

That looks like the ticket ...

Once you have a composite equity you should be able to calc DD's via 
something like this ...

CurEq    = CompositeEquity();
MaxEq    = Highest(CurEq);
CurDD    = 100 * (MaxEq - CurEq) / MaxEq;
MaxDD    = Highest(CurDD);


--- In amibroker@xxxxxxxxxxxxxxx, "Chuck Rademacher" 
<chuck_rademacher@x> wrote:
> Does the attached document reflect what you are trying to do?   It 
shows the
> actual equity curve for a large basket (13,500) of stocks, $10,000 
per
> trade.  There are about 12,000 trades, each being charged 1%
> commission/slippage.  The chart is monthly, but one click makes it 
weekly or
> daily.   It made with the AddToComposite function.   I haven't 
worked out an
> automatic way of calculating "proper" drawdown, but I can get what 
I want by
> simply looking at the graph.  I'm interested in peak-to-trough 
drawdown and
> how long it takes to reach a "new high" in the portfolio again.
> 
> Before someone tells me that there aren't 13,500 stocks currently 
being
> traded, let me say that I include extinct stocks that are no longer 
trading.
> 
> The total net profit is a bit hard to read, but it's something like 
$98
> million.
> 
> The actual syntax I use is AddToComposite(Equity()-500000,
> "~Composite","X",7);
> 
> I have initial capital set to 500,000 so that it will always trade 
$10,000
> even after taking small losses.   My AFL code sets the PositionSize 
= 10000.
> 
> Cheers
> 
>   -----Original Message-----
>   From: Fred [mailto:fctonetti@x...]
>   Sent: Friday, April 11, 2003 12:01 AM
>   To: amibroker@xxxxxxxxxxxxxxx
>   Subject: [amibroker] Re: Trade Analysis
> 
> 
>   Dingo,
> 
>   Right.  This is one of those things I just haven't gotten around 
to
>   doing with the Equity Line indicator I wrote as I don't typically
>   trade this way but I would think someone out there would have done
>   something like this so that they could get a good picture of the
>   Equity Curve and the associated DD's with the systems they are 
using
>   to trade multiple stocks or portfolios.  Yuki ?
> 
>   Fred
> 
>   --- In amibroker@xxxxxxxxxxxxxxx, "dingo" <dingo@xxxx> wrote:
>   > Fred I believe that you¡Çre correct in thinking that the
>   exploration is
>   > the way to see what is happening. You can get a line for every 
day
>   and
>   > by adding some columns you can get the high and low for each 
day and
>   > then do your own computations on max dd.
>   >
>   >
>   >
>   >
>   >
>   > d
>   >
>   > -----Original Message-----
>   > From: Fred Tonetti [mailto:ftonetti@x...]
>   > Sent: Thursday, April 10, 2003 11:41 PM
>   > To: amibroker@xxxxxxxxxxxxxxx
>   > Subject: [amibroker] Trade Analysis
>   >
>   >
>   >
>   > Phsst & Others interested in this subject,
>   >
>   > One of the problems with taking information from even a detailed
>   report
>   > in AB and exporting it to a CSV and then in turn importing into
>   Excel is
>   > that although it will properly show the Entry Date & Price and 
Exit
>   Date
>   > & Price, it does not show prices of whatever it is that¡Çs being
>   traded
>   > during the bars in between the entry and exit, therefore there 
is
>   no way
>   > using a methodology like that to come up with semi-accurate 
numbers
>   for
>   > drawdowns ¡Ä
>   >
>   > Example ¡Ä
>   >
>   > For simplicity I used Pring¡Çs KST system trading AA i.e. only 
one
>   stock
>   > ...
>   >
>   > As one can see from the report below there was a 7.1% CAR and 
36.71%
>   > drawdown on a close to close basis.
>   >
>   > In looking at the Equity Line in the graph (attached)  one can 
see
>   here
>   > too that there were the same results.
>   >
>   >
>   >
>   > But if one does a copy of the actual detail trade information 
and
>   paste
>   > into Excel (See Attached) and adds columns for max equity and
>   drawdown%
>   > and then at the bottom of the column takes the maximum of
>   drawdown%, the
>   > result shows an incorrectly low 27.67%.  The reason of course is
>   that
>   > the detailed report from AB and thus Excel does not show what
>   happened
>   > during the course of time that individual trades were being 
held.
>   >
>   > In looking at what is in the AB reports when multiple stocks are
>   traded
>   > some of which could be simultaneously or overlapping investments
>   there
>   > are several problems.
>   >
>   > 1.      AB apparently assumes that one must have enough capital 
to
>   buy
>   > say $10k of every stock in the run and so it forces initial 
equity
>   to be
>   > higher then it needs to be.
>   >
>   > 2.      AB reports as MaxDD what is the MaxDD for one stock 
trade
>   and
>   > although in some way this may be useful information it 
overstates
>   what
>   > MaxDD is for the account.  Beyond this though and given what
>   information
>   > is available in the detailed report trading only one stock, it
>   would not
>   > be possible to export all the trades for multiple stocks and 
get a
>   semi
>   > clear picture of what Returns or MaxDD for the system is.  This
>   would
>   > have to be done using a different methodology, probably 
utilizing an
>   > exploration.
>   >
>   > <<...>> <<...>> <<...>>
>   >
>   >
>   >
>   >
>   >
>   >
>   >
>   >
>   > Yahoo! Groups Sponsor
>   >
>   >
>   >
>   >
>   
<http://us.ard.yahoo.com/M=249982.3083889.4452939.1728375/D=egroupweb/
>   S=
>   > 1705632198:HM/A=1524963/R=0/*http:/hits.411web.com/cgi-
>   bin/autoredir?cam
>   > p=556&lineid=3083889¢ç=egroupweb&pos=HM>
>   >
>   >
>   >
>   > <http://us.adserver.yahoo.com/l?
>   M=249982.3083889.4452939.1728375/D=egrou
>   > pmail/S=:HM/A=1524963/rand=580298948>
>   >
>   >
>   > Send BUG REPORTS to bugs@xxxx
>   > Send SUGGESTIONS to suggest@xxxx
>   > -----------------------------------------
>   > 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!
>   > <http://docs.yahoo.com/info/terms/>  Terms of Service.
> 
> 
>         Yahoo! Groups Sponsor
>               Advertisement
> 
> 
> 
> 
>   Send BUG REPORTS to bugs@xxxx
>   Send SUGGESTIONS to suggest@xxxx
>   -----------------------------------------
>   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.


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Get a FREE REFINANCE QUOTE - click here!
http://us.click.yahoo.com/2CXtTB/ca0FAA/i5gGAA/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/