PureBytes Links
Trading Reference Links
|
Andy Dunn proposes a gambling game in which
the probability of a loss is 50.000 percent,
the probability of a win is 50.000 percent,
the payoff of a loss is (-k * betsize),
the payoff of a win is (+2k * betsize),
the AMOUNT RISKED PER PLAY is 1% of equity,
and the starting capital is $1 million.
Since the amount risked per play is known
in advance to be 1% of equity, this means
that a loss will reduce equity by 1%. And
since wins are twice as big as losses, this
means that a win will increase equity by 2%.
Because I went to school in the U.S. I didn't
take algebra until the 9th grade (age 14);
some of our international readers got to learn
it sooner, I'm sure. But even using this inferior
American 9th grade algebra, we can come up with
an expression for the final equity after TWO PLAYS
of the game, a loss and a win:
$after = $before * 0.99 * 1.02
Thus after N plays of the game we have:
$final = $starting * 1.0098^(N/2)
as Bob Fulks's email stated. Let's just do
a check on this expression: let's plug in N=30
and $starting= $1million. Whacking the
keys of the calculator, that's $1,157,525.31
for the final equity.
Next let's try Val Clancy's formula
> In this specific case:
> ( .99^n/2 - 1 ) *100
> where n = total number of trades.
Okay, .99^15 = 0.860058. Thus Val's expression
gives us -13.994. Kinda looks wrong. It's
a negative number whereas the game turned a
profit.
A third approach is (GASP!) to write a computer
program to calculate what happens if you play
Andy's game for 30 plays. Hard to imagine
anyone on the omega-list programming a computer,
but let's do it anyway. If the first play is
a loss, second play is a win, third play is a
loss, fourth play a win, ..., et cetera, you
get the following result:
BEGIN equity 1000000.000
trade 1 equity 990000.000 <<-- a loss
trade 2 equity 1009800.000 <<-- a win
trade 3 equity 999702.000 <<-- loss
trade 4 equity 1019696.040 <<-- win
trade 5 equity 1009499.080 <<-- etc.
trade 6 equity 1029689.061
trade 7 equity 1019392.171
trade 8 equity 1039780.014
trade 9 equity 1029382.214
trade 10 equity 1049969.858
trade 11 equity 1039470.160
trade 12 equity 1060259.563
trade 13 equity 1049656.967
trade 14 equity 1070650.106
trade 15 equity 1059943.605
trade 16 equity 1081142.477
trade 17 equity 1070331.053
trade 18 equity 1091737.674
trade 19 equity 1080820.297
trade 20 equity 1102436.703
trade 21 equity 1091412.336
trade 22 equity 1113240.583
trade 23 equity 1102108.177
trade 24 equity 1124150.340
trade 25 equity 1112908.837
trade 26 equity 1135167.014
trade 27 equity 1123815.344
trade 28 equity 1146291.650
trade 29 equity 1134828.734
trade 30 equity 1157525.309
What do you know, exactly as 9th grade
algebra predicted. Golly Mrs. Kimble
(my algebra teacher) sure was good at
her job.
Now of course we have only computed
the EXPECTED VALUE of Andy Dunn's game.
We haven't computed (for example) the
STANDARD DEVIATION of the outcome.
If Andy's game were played with a
fair coin-toss, wins probably would
not perfectly alternate with losses.
There'd be runs of wins and runs of
losses, and different strings of coin
toss outcomes would produce different
final equity values. We've only computed
what would be expected to happen,
on the average, if Andy Dunn's game were
played an infinite number of times.
Here's some code (awk):
BEGIN {
equity = 1.0e6
ntrades = 0;
printf "BEGIN equity %12.3f\n", equity
while(ntrades<30) {
# A losing trade
ntrades++
equity = equity * 0.99
printf "trade %2d equity %12.3f\n", ntrades, equity
# And now a winning trade
ntrades++
equity = equity * 1.02
printf "trade %2d equity %12.3f\n", ntrades, equity
}
}
|