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

[amibroker] Re: Expectancy - and related



PureBytes Links

Trading Reference Links

Hello Gerry,

Gee you are putting me under the pump now.

It is easy to get lost amongst the various definitions that float 
around.

For expectancy I have:

van Tharp

expectancy == (probability of a win * ave Win) - (prob loss * ave 
Loss)

My understanding is that the ave W or L is measured in $ values.

This definition is consistent with 'mathematical expectation"

>From Ralph Vince

Published by John Wiley & Sons, Inc.
Library of Congress Cataloging-in-Publication Data
Vince. Ralph. 1958-The mathematics of money management: risk analysis 
techniques for traders / by Ralph Vince


MATHEMATICAL EXPECTATION
By the same token, you are better off not to trade unless there is ab-
solutely overwhelming evidence that the market system you are con-
templating trading will be profitable-that is, unless you fully 
expect the market system in question to have a positive mathematical 
expectation when you trade it realtime.
Mathematical expectation is the amount you expect to make or lose, on 
average, each bet. In gambling parlance this is sometimes known as 
the player's edge (if positive to the player) or the house's 
advantage (if negative to the player):
(1.03) Mathematical Expectation = ?"[i = 1,N](Pi*Ai)
where
P = Probability of winning or losing.
A = Amount won or lost.
N = Number of possible outcomes.
The mathematical expectation is computed by multiplying each pos-
sible gain or loss by the probability of that gain or loss and then 
sum-ming these products together.
Let's look at the mathematical expectation for a game where you have 
a 50% chance of winning $2 and a 50% chance of losing $1 under this 
formula:
Mathematical Expectation = (.5*2)+(.5*(-1)) = 1+(-5) = .5
In such an instance, of course, your mathematical expectation is to 
win 50 cents per toss on average.
Consider betting on one number in roulette, where your mathemati-cal 
expectation is:
ME = ((1/38)*35)+((37/38)*(-1))
 = (.02631578947*35)+(.9736842105*(-1))
 = (9210526315)+(-.9736842105)
 = -.05263157903
Here, if you bet $1 on one number in roulette (American double-zero) 
you would expect to lose, on average, 5.26 cents per roll. If you bet 
$5, you would expect to lose, on average, 26.3 cents per roll. Notice 
that different amounts bet have different mathematical expectations 
in terms of amounts, but the expectation as a percentage of the 
amount bet is always the same. The player's expectation for a series 
of bets is the total of the expectations for the individual bets. So 
if you go play $1 on a number in roulette, then $10 on a number, then 
$5 on a number, your total expectation is:
ME = (-.0526*1)+(-.0526*10)+(-.0526*5) = -.0526-.526 .263 = -.8416
You would therefore expect to lose, on average, 84.16 cents.
This principle explains why systems that try to change the sizes of 
their bets relative to how many wins or losses have been seen 
(assuming an independent trials process) are doomed to fail. The 
summation of negative expectation bets is always a negative 
expectation!
The most fundamental point that you must understand in terms of money 
management is that in a negative expectation game, there is no money-
management scheme that will make you a winner. If you con-tinue to 
bet, regardless of how you manage your money, it is almost certain 
that you will be a loser, losing your entire stake no matter how 
large it was to start.
This axiom is not only true of a negative expectation game, it is 
true of an even-money game as well. Therefore, the only game you have 
a chance at winning in the long run is a positive arithmetic 
expectation game. 

van Tharps expectation is a restatement of Vinces 
Mathematical Expectation = (.5*2)+(.5*(-1)) = 1+(-5) = .5 since the 
loss confers negative sign to the second part of the equation.

I had to use a simple example to sort out my comments:

trade 3 times
win twice * $2 each
ave$ won == 2
lose once * $1
ave $ loss = 1 
gross win == $4
gross loss == $1
gross $won/gross $ lost == 4 == ProfitFactor (definition used by AB)
nett $gain = 4 - 1 == 3
expectancy $ = net $gain/#trades in total == 3/3 == $1

PF (also) == W/L * ave$W/ave$L = 2/1 * 2/1 == 4/1

van Tharp expectancy

probality of win == 2/3 == 0.666
prob of loss == 1/3 == 0.3333
expectancy == (0.666 * 2) - (0.333 * 1) == 1.332 - 0.333 
van Tharp expectancy is approx == $1
this is the same as PF expectancy


I went off Profit Factor as a metric because of the errors introduced 
when adjusted data is used (using unadjusted data biases backtesting 
for EOD trades).

I use expectancy in a different way - I am not a mathematician but 
the way I use it is a lot closer to geometrical mean than anything 
else - I use expectancy in % terms - for my own use I changed the 
name to PowerFactor - it also has a better mathematical relationship 
to some other useful metrics, including some used in portfolio 
management.

Thanks for your post - important topics that are always worth the 
discussion.

brian_z







--- In amibroker@xxxxxxxxxxxxxxx, "gerryjoz" <geraldj@xxx> wrote:
>
> In an earlier post, expectancy was associated with profit factor. 
> It is more closely related to payoff ratio.
> In Van Tharp's book, 2nd edition, "Trade your way...", page 204 et
> seq, he calculates 
> Expectancy = average profit/ # trades
>   divided by average loss.
> Payoff ratio is average profit/average loss,
> so 
> Expectancy = payoff ratio/# trades.
> --which can give very low numbers, and makes the concept rather
> dubious if you are using it as an absolute value for comparing 
systems
> with different numbers of trades. It might be better to use trades 
per
> annum.
> To be fair Van Tharp only gives that way of calculating expectancy 
as
> a default if the risk of a trade isn't able to be calculated taking
> into account a pre-determined proportion of equity. For that, you 
need
> to read the whole chapter.
> Personally i find CAR/MDD, RRR more relevant, along with the raw
> Payoff ratio.
>   
> The K-ratio isn't worth the space it takes up: RRR is simpler.
> 
> regards 
> Gerry
>



------------------------------------

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/