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

Re: [amibroker] Re: Tharp's Expectancy Calculation



PureBytes Links

Trading Reference Links


Silvarius is right. Rob, if you are risking 1% of capital, you can easily 
calculate expectancy in the following way: suppose your capital is $100,000, and 
your risk per trade is 1% of $100,000 or $1,000. Your risk in terms of 
R-multiples is 1R, where 1R is defined as $1,000 risked per trade. According to 
Tharp, the easiest way to calculate expectancy is simply to add up all your 
R-multiples and net them out by subtracting the negative R-multiples from the 
positive ones, then divide by the no. of trades. This gives you your expectancy 
per trade. In Rob's case, his average winning trade was $3,413 or 3.4 R 
with 13 winners. His total positive R-multiple earned was 3.4 * 13 or +44.2R. 
His average losing trade was $811 or -0.8 R with 18 losers. His total R-multiple 
lost was -0.8 * 18 or -14.4 R. So, his total net R-multiple return was 44.2- 
14.4 = 29.8 R per trade. He had 31 trades, so his expectancy per trade is 
29.8/31 or 0.96 R per trade. This means for every dollar risked, he makes his 
dollar back plus an additional $0.96. Not a bad return or expectancy. Rob, care 
to share your system with the board? 
 
Regarding what Silvarius said about accounting for position sizing, that's 
why you can't directly use Amibroker's avg win/avg loss ratio if you used 
position sizing in your backtesting. For example, in Rob's case, his W/L ratio 
was 3412/811 = 4.21. The fraction of winners is 13/31 = 0.42. If you use Tharp's 
formula for calculating expectancy, it would be 0.42*4.21 - 0.58*1 = 1.19. The 
expectancy is too high (1.19 vs. the correct 0.96) because you didn't take into 
consideration the weighting of winners and losers due to position sizing. 

 
Al Venosa
 
----- Original Message ----- 
<BLOCKQUOTE 
>
<DIV 
>From: 
Silvarius 

To: <A title=amibroker@xxxxxxxxxx 
href="">amibroker@xxxxxxxxxxxxxxx 
Sent: Friday, June 21, 2002 1:30 PM
Subject: RE: [amibroker] Re: Tharp's 
Expectancy Calculation

Hi 
Rob,
<FONT face=Arial color=#0000ff 
size=2> 
Your 
calculation of expectency is not correct. Hereafter are a few considerations 
that may help you :
<FONT face=Arial color=#0000ff 
size=2> 
1) 
You cannot calculate expentency after applying position sizing. If you doso, 
just imagine your first trade is made with 100 shares, and your last with300 
shares (the system is good and your equity si growing :-)), with an identical 
result in term of percentage (let's say a gain of 15%), the last trade will 
"weight" 3 times as much as the first one. So calculate your expentency BEFORE 
applying position sizing, or express every trade on a one share basis by 
dividing every single trade by the number of shares you risked in 
it.
<FONT face=Arial color=#0000ff 
size=2> 
2) 
The expectency can be expressed in different unit of risk. If you apply the 
formula : "average gain * perc gain - average loss * perc loss", you express 
the expectency in dollars for one share invested if the basis of your test is 
one share (once again, it works only if your test is made before applying 
position sizing). You can also calculate : "win/loss ratio * perc gain - perc 
loss". Here, you express your expectency for one unit of average loss. You can 
also express your expectency for $ 100 invested by expressing the resultsof 
your trades in term of percentage (a 15% gain is  $ 15 for $ 100 
invested). And you can also express your results in term of stop if you 
consider your risk is determined by your stop (by dividing the result of each 
of your trades in dollars by the amount of your stop). There, the 
expectency is expressed for one dollar risked (but of course, if you change 
the amount of your stop, the expectency is different and must be 
recalculated).
<FONT face=Arial color=#0000ff 
size=2> 
As 
you can see, you can have different value of expectency for one system 
according to the unit in which you express it. It up to you to choose theone 
that you understand best. One thing that doesn't change nevertheless, is that 
a system that shows a positive expectency will remain positive whatever unit 
you choose.
<FONT face=Arial color=#0000ff 
size=2> 
<FONT face=Arial color=#0000ff 
size=2>Well, I could have given you a formula "ready to use", but I think it 
wouldn't have been a good solution, as a figure that is not understood is 
useless. Or so is my belief. The final point is : you must be able to say, 
after having calculated your expectency : "if I invest/risk 1 unit on one 
trade,  I get 1 unit + gain as a result on the long 
term".
<FONT face=Arial color=#0000ff 
size=2> 
Best 
regards, Jerome ULRICH

<FONT face=Tahoma 
size=2>-----Message d'origine-----De : bowbie89 
[mailto:robm@xxxx]Envoyé : vendredi 21 juin 2002 
15:01À : amibroker@xxxxxxxxxxxxxxxObjet : 
[amibroker] Re: Tharp's Expectancy CalculationHello 
Jerome,This was a test just on one stock(MSFT).  I'm stillnot 
seeing this clearly.  My overall system expectancy is $937 by 
taking my net profit and dividing it by the # of trades(31).  I am 
risking 1% of my equity as you can see in the code below 
-Capital=100000;risk=.01*Capital;shares=risk/Max(2*ATR(10),2*ATR(3) 
);PositionSize=shares*Ep;Total profits on winning trades(13) = 
44,366Total losses on losing trades(18) = 15,322From the 
statistics printout my Avg Win/Avg Loss = 3.86So Avg Win X Pct. Win - 
Avg. Loss X Pct. Loss = 1.04Yet it seems when I try to eliminate the 
position sizing effect to get down to a per share basis, it seems to 
give me a negative expectancy.  It just seems like I should setup 
my probability matrix and leave my gains & losses as is.Any 
more thoughts on this?Rob --- In amibroker@xxxx, 
"Silvarius" <silvarius@xxxx> wrote:> Hello Rob,> 
> The method to divide your results by the number of shares is the 
right one> only if you test a system on a single security. If you 
test it on multiple> securities, you must make it on a basisthat 
is commun to every securities> (money, percentage, indices etc 
...).> > Best regards, Jerome ULRICH>   
-----Message d'origine----->   De : bowbie89 
[mailto:robm@xxxx]>   Envoye : vendredi 21 juin 2002 
05:15>   A : amibroker@xxxx>   Objet : 
[amibroker] Tharp's Expectancy Calculation> > 
>   Hello All,> >   I was wondering 
if someone could help me out.  I'm having trouble>   
calculating expectancy based upon Tharp's book.  I 
know>   I can calculate the expectancy from the statistic 
report using avg>   win/avg loss but I wanted to follow 
Tharp's procedure.>   I just did a simple backtest on 
Microsoft and was trying to figure>   out the expectancy 
based upon Tharp's "Trade Your>   Way To Financial Freedom" 
book.  On page 158, his second step is to>   
eliminate the effect of position sizing by only>   
considering single units or 100 share blocks.  I think this is 
where>   I'm having my problems.  Am I supposed to 
divide my>   gains and losses by the number of shares and 
then times it by 100?  I>   did this but it just 
doesn't seem right.  I wanted to>   attach my excel 
file but I don't think I have the rights to upload 
it>   or I'm not seeing how to do it.> 
>   Thanks for any help,> >   
Rob> > 
>         Yahoo! Groups 
Sponsor>               
ADVERTISEMENT> > > > >   Your 
use of Yahoo! Groups is subject to the Yahoo! Terms of 
Service.Your use of Yahoo! Groups is subject to 
the Yahoo! Terms of 
Service. Your 
use of Yahoo! Groups is subject to the <A 
href="">Yahoo! Terms of Service.