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

RE: [amibroker] Re: 2 cent worth on MoneyManagement



PureBytes Links

Trading Reference Links

Can you help me link this to a typical AB BackTest report
(attached)?

avg win$ = Average winning trade: 15.71
avg loss$ = Average losing trade: -17.04
%Win = Percent profitable: 61.8

Plugging these numbers in your formula I get:

Expectation = ( 1 + 15.71 / 17.04 ) * .618 - 1 = 0.172

I assume the minus sign for Average losing trade is dropped? This
was a backtest on the N100 so I am not quite sure how to
interpret this if we apply the formula to groups... ideas? Taking
the top ten stocks from this test i get

Expectation = ( 1 + 35.19 / 42.94 ) * .706 - 1 = 0.284 still not
very good...

It looks like my decision to work first on trading systems before
tackling MM was correct: i am a long way off from 0.7 !

Still, I am not quite sure what to think of this... the first
test gave me 161%/ann average for 100 stocks, the second test
gave me 660%/ann average for 10 stocks (of course assuming I
could screen the best stocks) over about 5000 trades. To get 0.7
I'll have to be making thousands of percent per year... where did
i go wrong? I guess the problem is that the losers are too big,
adding stops might improve the Expectation rating but would
reduce profits... hmmm sounds familiar :-)

So, we need to Optimize for Expectation... now, wouldn't that be
fun?! I might just work on that this weekend :-) AmiBroker can do
anything, right? I love a good afl challenge.

Intuition tells me the formula ought to have a factor for
frequency/distribution of trading/profits and the testing period
under consideration. This formula would give good results if I
had only two very profitable trades and two small losers - not
right... WinTradeDuration/LosingTradeDuration probably ought to
be in there too... How can we factor those in?

Many thanks triggering those sleepy neurons,
Herman

PS. Sorry for not letting this thread end...


-----Original Message-----
From: William Wong [mailto:williamwongab@x...]
Sent: 18 October, 2002 3:31 AM
To: amibroker@xxxxxxxxxxxxxxx
Subject: RE: [amibroker] Re: 2 cent worth on MoneyManagement


My 2 cents worth on money management.

A system performance is governed by a combination of %winning
trades and pay off ratio (avg win$ / avg loss$). If an
expectation of a system is negative, no matter how good the money
management, it only slows down an eventual death.

Expectation = (1 + pay off ratio) * %win - 1

e.g. If a system gives pay off ratio of 2:1 but only
profitable 30% of the time,

Exp = (1 + 2) * 0.3 - 1 = -0.1, not worth using

But if the accuracy is improved to 40%,

Exp = (1 + 2) * 0.4 - 1 = 0.2, worth using

The higher the expectation, the better the system. Rule of
thumb is to improve to at least 0.7.

Now when a system has a positive expectation, then money
management comes into play. MM is about reducing the Risk of
Ruin, the chance of lossing x% of your portfolio before you
decide to quit. It about staying in the game. It is the
different between punting and making a living on trading. A
mediocre system (positive expectation) with a sound money mgmt is
good enough to trade for a living.





-----------------------------------------------------------------
-------------
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos, & more
faith.yahoo.com
Yahoo! Groups Sponsor
ADVERTISEMENT




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.


------=_NextPart_001_0001_01C276D6.42F7A500
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" http-equiv=3DContent-Type=
>
<META content=3D"MSHTML 5.00.2614.3500" name=3DGENERATOR></HEAD>
<BODY>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN class=3D060393621-18=
102002>Thank=20
you William,</SPAN></FONT></DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN=20
class=3D060393621-18102002></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN class=3D060393621-18=
102002>Can=20
you help me&nbsp;link this to a typical AB BackTest report=20
(attached)?</SPAN></FONT></DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN=20
class=3D060393621-18102002></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN class=3D060393621-18=
102002>avg=20
win$&nbsp; =3D Average winning trade: 15.71</SPAN></FONT></DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN class=3D060393621-18=
102002>avg=20
loss$ =3D Average losing trade: -17.04</SPAN></FONT></DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN=20
class=3D060393621-18102002>%Win&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =3D Percent=20
profitable: 61.8</SPAN></FONT></DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN=20
class=3D060393621-18102002></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN=20
class=3D060393621-18102002>Plugging these numbers in your formula I=20
get:</SPAN></FONT></DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN=20
class=3D060393621-18102002></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN=20
class=3D060393621-18102002>Expectation =3D ( 1 + 15.71 / 17.04 ) * .618 - 1=
=3D=20
0.172</SPAN></FONT></DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN=20
class=3D060393621-18102002></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN class=3D060393621-18=
102002>I=20
assume the minus sign for Average losing trade is dropped</SPAN></FONT><FON=
T=20
color=3D#0000ff face=3DArial size=3D2><SPAN class=3D060393621-18102002>? Th=
is was a=20
backtest on the N100 so I am not quite sure how to interpret this if we app=
ly=20
the formula to groups... ideas? </SPAN></FONT><FONT color=3D#0000ff face=3D=
Arial=20
size=3D2><SPAN class=3D060393621-18102002>Taking the top ten stocks from th=
is test i=20
get&nbsp;</SPAN></FONT></DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN=20
class=3D060393621-18102002></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN class=3D060393621-18=
102002><FONT=20
color=3D#0000ff face=3DArial size=3D2><SPAN class=3D060393621-18102002>Expe=
ctation =3D ( 1=20
+&nbsp;35.19 /&nbsp;42.94 ) * .706 - 1 =3D 0.284 still not very=20
good...</SPAN></FONT></SPAN></FONT></DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN=20
class=3D060393621-18102002>&nbsp;</SPAN></FONT></DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN class=3D060393621-18=
102002>It=20
looks like my decision to work first on trading systems before tackling MM =
was=20
correct: i am a long way off from 0.7 !</SPAN></FONT></DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN=20
class=3D060393621-18102002></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN class=3D060393621-18=
102002>Still,=20
I am not quite sure what to think of this... the first test gave me 161%/an=
n=20
<U>average </U>for 100 stocks, the second test gave me 660%/ann <U>average=
=20
</U>for 10 stocks (of course assuming I could screen the best stocks) over =
about=20
5000 trades. To get 0.7 I'll have to be making thousands of percent per yea=
r...=20
where did i go wrong? I guess the problem is that the losers are too big, a=
dding=20
stops might improve the Expectation rating&nbsp;but would reduce profits...=
hmmm=20
sounds familiar :-) </SPAN></FONT></DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN=20
class=3D060393621-18102002></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN=20
class=3D060393621-18102002>So,&nbsp;we need to Optimize for Expectation... =
now,=20
wouldn't that be fun?!&nbsp;I might just work on that this weekend :-) AmiB=
roker=20
can do anything, right?&nbsp;I love a good afl challenge.</SPAN></FONT></DI=
V>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN=20
class=3D060393621-18102002></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN=20
class=3D060393621-18102002>Intuition tells me the formula&nbsp;ought to hav=
e a=20
factor for frequency/distribution of trading/profits and the testing period=
=20
under consideration. This formula would give good results if I had only two=
very=20
profitable trades and two small losers - not right...=20
WinTradeDuration/LosingTradeDuration&nbsp;probably ought to be in there too=
...=20
How can we factor those in?</SPAN></FONT></DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN=20
class=3D060393621-18102002></SPAN></FONT><FONT color=3D#0000ff face=3DArial=
=20
size=3D2><SPAN class=3D060393621-18102002></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN class=3D060393621-18=
102002>Many=20
thanks triggering those sleepy neurons,</SPAN></FONT></DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN=20
class=3D060393621-18102002>Herman</SPAN></FONT></DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN=20
class=3D060393621-18102002></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN class=3D060393621-18=
102002>PS.=20
Sorry for not letting this thread end...</SPAN></FONT></DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN=20
class=3D060393621-18102002></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#0000ff face=3DArial size=3D2><SPAN=20
class=3D060393621-18102002></SPAN></FONT>&nbsp;</DIV>
<BLOCKQUOTE=20
style=3D"BORDER-LEFT: #0000ff 2px solid; MARGIN-LEFT: 5px; PADDING-LEFT: 5p=
x">
<DIV align=3Dleft class=3DOutlookMessageHeader dir=3Dltr><FONT face=3DTah=
oma=20
size=3D2>-----Original Message-----<BR><B>From:</B> William Wong=20
[mailto:williamwongab@x...]<BR><B>Sent:</B> 18 October, 2002 3:31=20
AM<BR><B>To:</B> amibroker@xxxxxxxxxxxxxxx<BR><B>Subject:</B> RE: [amibro=
ker]=20
Re: 2 cent worth on MoneyManagement<BR><BR></DIV></FONT>
<P>My 2 cents worth on money management.=20
<P>A system performance is governed by a combination of %winning trades a=
nd=20
pay off ratio (avg win$ / avg loss$).&nbsp; If an expectation of a system=
is=20
negative, no matter&nbsp;how good&nbsp;the money management, it only slow=
s=20
down an eventual death.=20
<P>Expectation =3D (1 + pay off ratio) * %win - 1=20
<P>e.g.&nbsp; If a system gives pay off ratio of 2:1 but only profitable =
30%=20
of the time,=20
<P>Exp =3D (1 + 2) * 0.3 - 1 =3D -0.1, not worth using=20
<P>But if the accuracy is improved to 40%,=20
<P>Exp =3D (1 + 2) * 0.4 - 1 =3D 0.2, worth using=20
<P>The higher the expectation, the better the system.&nbsp; Rule of thumb=
is=20
to improve to at least 0.7.=20
<P>Now when a system has a positive expectation, then money management co=
mes=20
into play.&nbsp; MM is about reducing the Risk of Ruin, the chance of los=
sing=20
x% of your portfolio before you decide to quit.&nbsp; It about staying in=
the=20
game.&nbsp; It is the different between punting and making a living on=20
trading.&nbsp; A mediocre system (positive expectation) with a sound mone=
y=20
mgmt is good enough to trade for a living.</P>
<P><BR>
<HR SIZE=3D1>
Do you Yahoo!?<BR><A href=3D"http://faith.yahoo.com";>Faith Hill</A> - Exc=
lusive=20
Performances, Videos, &amp; more<BR><A=20
href=3D"http://faith.yahoo.com";>faith.yahoo.com</A> <BR><BR><TT>Post=20
AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx <BR>(Web page=
: <A=20
href=3D"http://groups.yahoo.com/group/amiquote/messages/)">http://groups.=
yahoo.com/group/amiquote/messages/)</A><BR><BR>Check=20
group FAQ at: <A=20
href=3D"http://groups.yahoo.com/group/amibroker/files/groupfaq.html";>http=
://groups.yahoo.com/group/amibroker/files/groupfaq.html</A></TT>=20
<BR><BR><TT>Your use of Yahoo! Groups is subject to the <A=20
href=3D"http://docs.yahoo.com/info/terms/";>Yahoo! Terms of Service</A>.</=
TT>=20
<BR></BLOCKQUOTE></BODY></HTML>

------=_NextPart_001_0001_01C276D6.42F7A500--

Title: AmiBroker System Test Report






Overall performance summary

 

Total net profit:
16397.46
 
Total commissions paid:
0.00

Return on account:
167.32 % 
 
Open position gain/loss
-525.51

Buy&Hold profit:
-3024.58
 
Bars (avg. days) in test:
25480 (375)

Buy&Hold % return:
-30.86%
 
System to Buy&Hold index:
642.14%

 

Annual system % return:
160.40%
 
Annual B&H % return:
-30.18%

 

System drawdown:
-82.66
 
B&H drawdown:
-92.85

Max. system drawdown:
-1191.56
 
B&H max. drawdown:
-260.31

Max. system % drawdown:
-93.74%
 
B&H max. % drawdown:
-95.74%

Max. trade drawdown:
-581.29
 
 
 

Max. trade % drawdown:
-88.23%
 
 
 

Trade drawdown:
-444.52
 
 
 

 

Total number of trades:
5295
 
Percent profitable:
61.8%

Number winning trades:
3272
 
Number losing trades:
2023

Profit of winners:
51391.78
 
Loss of losers:
-34468.81

Total # of bars in winners:
16905
 
Total # of bars in losers:
13187

Commissions paid in winners:
0.00
 
Commissions paid in losers:
0.00

 

Largest winning trade:
258.56
 
Largest losing trade:
-357.47

# of bars in largest winner:
4
 
# bars in largest loser:
7

Commission paid in largest winner:
0.00
 
Commission paid in largest loser:
0.00

 

Average winning trade:
15.71
 
Average losing trade:
-17.04

Avg. # of bars in winners:
5.2
 
Avg. # bars in losers:
6.5

Avg. commission paid in winner:
0.00
 
Avg. commission paid in loser:
0.00

Max consec. winners:
15
 
Max consec. losers:
8

 

Bars out of the market:
194
 
Interest earned:
0.00

 

Exposure:
99.2%
 
Risk adjusted ann. return:
161.63%

Ratio avg win/avg loss:
0.92
 
Avg. trade (win & loss):
3.20

Profit factor:
1.49