General Topics
Markets
Technical Topics
Brokerage Firms
Community Lounge
Site Support

# z=(1-x)*(1+y*x)

Discussion in 'Trading' started by qll, Nov 30, 2006.

1. ### qll

z=(1-x)*(1+y*x)
x is the max % you can risk per trade
y is how many winning trades you get per loss.
z is the value of the function.

when y=3, z will see the max at 0.34. so it means, when we can can stop loss at 34% of total portfolio if for 1 loss, we can see 3 wins, assuming win and loss sizes are the same.

y=3
x z
0.1 1.17
0.12 1.1968
0.14 1.2212
0.16 1.2432
0.18 1.2628
0.2 1.28
0.22 1.2948
0.24 1.3072
0.26 1.3172
0.28 1.3248
0.3 1.33
0.32 1.3328
0.34 1.3332
0.36 1.3312
0.38 1.3268
0.4 1.32
0.42 1.3108
0.44 1.2992
0.46 1.2852
z peaks at x=34%

y=9
x z
0.1 1.71
0.12 1.8304
0.14 1.9436
0.16 2.0496
0.18 2.1484
0.2 2.24
0.22 2.3244
0.24 2.4016
0.26 2.4716
0.28 2.5344
0.3 2.59
0.32 2.6384
0.34 2.6796
0.36 2.7136
0.38 2.7404
0.4 2.76
0.42 2.7724
0.44 2.7776
0.46 2.7756
0.48 2.7664
0.5 2.75
0.52 2.7264
0.54 2.6956
0.56 2.6576
0.58 2.6124
z peaks at x=44%

how mathmatically calculate the max value of Z? without using excel to list everything and eye pick the max value?

2. ### kevinmr

Your max/min of z along the x axis is:
(y - 1) / (2 * y)

3. ### qll

that is right. thanks.

so if you can get 1 wrong, out of 2 trades, then you should not trade.
if you get 1 wrong, out of 3, you should risk 25%
if you get 1 wrong, out of 4, you should risk 33%.

don't you or anyone think it is too high comparing to traditional money/risk management? which is often risk 2% per trade?

this applys to 1 tick scalper too.

4. ### late apex

qll, what exactly are you trying to do with your formula for z?

If you'd like to calculate the theoretically optimal fraction f of portfolio to risk in order to maximize expectancy, given reliability P (% wins, or probability of a win) and average win/loss ratio R, then your formula is incorrect.

The correct formula for (Kelly) optimal f is

f = ((R + 1) * P - 1) / R

In your examples, R = 1; P = 75% and 90%. Therefore, f = 50.00% and 80.00%, respectively, not ~34% and ~44%.

Yes, the optimal fraction f here is "too high". Its computation is intended strictly to maximize expectancy per trade and, thus, terminal wealth / portfolio value. It assumes a stationary distribution and a sufficiently large number of trades, among other things. It also ignores the whole notion of drawdowns on the yellow brick road to the aforementioned terminal wealth, unlike in the real world.

5. ### qll

my caculation is for limited tries. (2 exactly in my example).
it is used in
if i can only place 2 trades. the first trade is a loss, and i know my past performance, how much should i bet in the second trade.

if i have 4 weeks, i already lost in the first week, how much i want to risk for each other week.

my reason for this is that up \$1k in 2 days is much better than up \$50k in 1 day then down \$45k in the other day. at least for me. so keep winning days or winning weeks are much more important than have a max return. some times a good night sleep and relaxed mind are much better than money.

6. ### qll

here are some more findings:

for 12 months, i expect return each month using current size of my trades as
0.9
0.9
0.9
0.8
1.1
1.1
1.1
1.1
1.1
1.1
1.3
1.2
then i got 1.61 for the year, so i earn 61% for the year.

if i double the size of my trades
0.8
0.8
0.8
0.6
1.2
1.2
1.2
1.2
1.2
1.2
1.6
1.4
i got 2.05, so i earn 105%

if i triple the size
0.7
0.7
0.7
0.4
1.3
1.3
1.3
1.3
1.3
1.3
1.9
1.6
i got 2.01, so to earn 101%

if i 4times my size
0.6
0.6
0.6
0.2
1.4
1.4
1.4
1.4
1.4
1.4
2.2
1.8
i got 1.2, so only 20% for my year

thus in this case, the best bet is case#2, double my normal size.

7. ### eagle

Looks nice! Unfortunately, the other side aren't machine, they are human, meaning that their actions are not determinist and strictly depend on their mood; and therefore none of the known mathematical formula could predict their behavior. If we are trying to use mathematical formula to decide for our entry/exit then we are trying to limit our action against the unlimited action. Clearly, we are in the disadvantaged position. Flexibility is a must to survive in this business.

8. ### HolyGrail

What's worse is it doesn't take into account market conditions. Just think how much money you would have lost with that formula in 2001 and 2002.

9. ### William Rennick

Would the moderator please ban this jackass. He is obviously trying to spam his wares using some kind of a secret spy code.

Rennick out

10. ### bsmeter2

The guy has a good long term stock picking strategy.

#10     Dec 3, 2006
ET IS FREE BECAUSE OF THE FINANCIAL SUPPORT FROM THESE COMPANIES: