Statistics of Probable outcome of Trading systems!

No one Knows

Member
Messages
68
Likes
9
Hi,

Can anyone confirm my calculation for the odds of having 10 trades in a row that are losers in a sample of 2400 trades as i am not sure if i am doing this right. Here is my working based on an entry technique that produces 60% winners and therefore 40% losers.

0.4^10 = 0.0001048576 (This is the percent chance "as decimal" of 10 in a row happening "I think")

2400 x 0.0001048576 = 0.25165824 = 25% chance

chance of 20 in a row:-

0.4^20 = 0.00000001099511627776

2400 x 0.00000001099511627776 = 0.000026388279066624 = 0.0026%

Am i thinking right or not?

regards Mark
 
Hi,



Am i thinking right or not?

regards Mark

Broadly yes, although you won't quite have 2400 chances to get 10 or 20 losses in a row.

It is useful though (not that this isn't useful!) to calculate a number of equity curves by randomly distributing wins/losses as exactly where these occur can make a surprisingly big difference to the end result.

Ben
 
Broadly yes, although you won't quite have 2400 chances to get 10 or 20 losses in a row.

It is useful though (not that this isn't useful!) to calculate a number of equity curves by randomly distributing wins/losses as exactly where these occur can make a surprisingly big difference to the end result.

Ben

Agreed 100%. The problem isnt just runs of consecutive losing trades, its clusters of smaller consecutive losing trades seperated by the occassional wins that can have quite asignificant effect.
 
Hi Mark,

Unfortunately probability theory isn't this easy - you are dealing with 10 consecutive outcomes in a group of independent trades. This isn't as simple as calculating the probability of ten consecutive outcomes and then multiplying it by the number of iterations - Firstly, because in such a calculation you are only dealing with 240 bins of 10 trades, and secondly because of the theory of runs, or clumps - 2400 trades has a lot more than 240 bins of 10 trades within it, because your run could happen between the 21st and 31st trade, or the 57th and 67th trades - each group has an independent 0.01048576% chance of being all heads you are correct, but the nature of probability dictates that you cannot simply multiply this by the total number of outcomes.

Are we looking for the probability of seeing only one run of 10? There could be more than one. In either case, we need to use functions involving strings and/or matrices [probably within a computer maths language (Fortran, Maple) for ease] to determine your probability - something which I have nowhere near enough time to work out just now, but I will have a think about later ;)

SL
 
Are we looking for the probability of seeing only one run of 10? There could be more than one. In either case, we need to use functions involving strings and/or matrices [probably within a computer maths language (Fortran, Maple) for ease] to determine your probability - something which I have nowhere near enough time to work out just now, but I will have a think about later ;)

SL

Agree I think (although my brain is hurting!).

This is why I have always preferred to make these types of calculations 'long-hand' as you can then have a bit more confidence in the outputs and also more clearly see the effect of randomness (as you say, each trade is independent of the others).

It is easy to have a row in excel per trade. Use the random number generator together with your win-rate to determine if that particular trade was a winner. Use that result and your reward:risk and risk/trade and you can calculate the P/L for that trade, adjust your account balance and move onto the next row/trade.

Just to clarify the important point made by Zupcon. It isn't sufficient to worry about 10 losses in a row as that may be followed by 1 win, 3 losses, 2 wins, 10 losses and much gnashing of teeth!!

Ben
 
Just to clarify the important point made by Zupcon. It isn't sufficient to worry about 10 losses in a row as that may be followed by 1 win, 3 losses, 2 wins, 10 losses and much gnashing of teeth!!

Ben

Agreed, good point. To be honest I don't really see the value in calculating this anyway; knowing that your system was 60% accurate would be sufficient in my book. If you're doing this because you are trading such size that 10 losing trades would wipe out your account, and want to know the likelihood of blowing up over 2400 trades, then you need to seriously think about your money management! :)
 
Hi Mark,

Unfortunately probability theory isn't this easy - you are dealing with 10 consecutive outcomes in a group of independent trades. This isn't as simple as calculating the probability of ten consecutive outcomes and then multiplying it by the number of iterations - Firstly, because in such a calculation you are only dealing with 240 bins of 10 trades, and secondly because of the theory of runs, or clumps - 2400 trades has a lot more than 240 bins of 10 trades within it, because your run could happen between the 21st and 31st trade, or the 57th and 67th trades - each group has an independent 0.01048576% chance of being all heads you are correct, but the nature of probability dictates that you cannot simply multiply this by the total number of outcomes.

Are we looking for the probability of seeing only one run of 10? There could be more than one. In either case, we need to use functions involving strings and/or matrices [probably within a computer maths language (Fortran, Maple) for ease] to determine your probability - something which I have nowhere near enough time to work out just now, but I will have a think about later ;)

SL

Hi skill,

Quote, "2400 trades has a lot more than 240 bins of 10 trades within it". This is why i multiplied by 2400 and not 240 in my calculation, although now come to think of it i should have multiplied by 2390 "bins".

Suppose this isn't going to help me in working out maximum theoretical drawdown as what zupcon says, its not maximium consecutive losing run that is "that" important its the Maximium adverse excursion.

thanks

regards Mark
 
Agreed, good point. To be honest I don't really see the value in calculating this anyway; knowing that your system was 60% accurate would be sufficient in my book. If you're doing this because you are trading such size that 10 losing trades would wipe out your account, and want to know the likelihood of blowing up over 2400 trades, then you need to seriously think about your money management! :)

Hi skill,

I am simply doing this to further understand the odds of such an event happening so as to be better prepared for it psychologically when trading. Also to optimize the risk per trade to maximize profits but without risking more than a absolute maximum drawdown of 40%.

regards Mark
 

Hi skill,

I am simply doing this to further understand the odds of such an event happening so as to be better prepared for it psychologically when trading. Also to optimize the risk per trade to maximize profits but without risking more than a absolute maximum drawdown of 40%.

regards Mark

Hi mate,

Can I recommend that you read Mark Douglas' 'Trading in the Zone' in that case - it's a little turgid, and some of the stuff in it (such as how fear forms negative energy ions in your brain) smacks a bit of hippy bull****, but in terms of explaining the psychology of trading it is excellent.

With regards to your maximum drawdown: as Mark himself says, ANYTHING can happen in trading...

SL
 

Hi skill,

I am simply doing this to further understand the odds of such an event happening so as to be better prepared for it psychologically when trading. Also to optimize the risk per trade to maximize profits but without risking more than a absolute maximum drawdown of 40%.

regards Mark

Seems like quite a sensible/interesting thread for a change.

Make you think about what is the best way to evaluate a trading system?

Total return over test period?
Smallest historical draw down?
profit factor?
range of profit factors over time?

I’ve read that it is not mathematically correct to use historical draw down? (but haven't quite got my head around why?)

hmmm
 
Hi mate,

Can I recommend that you read Mark Douglas' 'Trading in the Zone' in that case - it's a little turgid, and some of the stuff in it (such as how fear forms negative energy ions in your brain) smacks a bit of hippy bull****, but in terms of explaining the psychology of trading it is excellent.

With regards to your maximum drawdown: as Mark himself says, ANYTHING can happen in trading...

SL


Thanks, will add to my reading list

regards Mark
 
Seems like quite a sensible/interesting thread for a change.

Make you think about what is the best way to evaluate a trading system?

Total return over test period?
Smallest historical draw down?
profit factor?
range of profit factors over time?

I’ve read that it is not mathematically correct to use historical draw down? (but haven't quite got my head around why?)

hmmm

Hi Belflan,

Its not mathematically correct because we cant predict the future we can only see whats happened in the past and make our best guess of the future. Looking at historical drawdown gives a good estimate, but if you assume there is a worse drawdown just round the corner, and therefore assume it could be a factor of 2 or so larger and plan for this, then you'll be stood on sturdy trading ground.(I believe)

regards Mark
 
Hi Belflan,

Its not mathematically correct because we cant predict the future we can only see whats happened in the past and make our best guess of the future. Looking at historical drawdown gives a good estimate, but if you assume there is a worse drawdown just round the corner, and therefore assume it could be a factor of 2 or so larger and plan for this, then you'll be stood on sturdy trading ground.(I believe)

regards Mark

hi Mark,
I think it’s to do with most trading systems being an independent trials process (like a coin toss). If you’ve tossed a coin 100 times (trying for heads) and your maximum losing streak (draw down) is 20 tails in a row, will this have any bearing on the 50:50 outcome in future of your coin toss system
Of course this is if the trading system in question is an independent trails process:)
belflan
 
The best way to convince yourself that maths is a useful but limited way to tackle risk management is to read up about 'Kelly Value', Kelly value applied to stock market speculations. Must read for any trader

It makes perfect sense until you realise that the answer is to risk 24% (in my case) of capital on each trade :-0.

I think if you look at this whole area in a quantitative way (and I have, to the point where my gf nearly left me) then all you really learn is that you have to expect big draw-downs, you have to expect a lot of variability in returns and to be able to say something statistically sound about a system/strategy you need to multiply that already large sample size by pi!*

Ben

* That's pi exclamation mark not pi factorial. I am now outed as a geek.
 
The best way to convince yourself that maths is a useful but limited way to tackle risk management is to read up about 'Kelly Value', Kelly value applied to stock market speculations. Must read for any trader

It makes perfect sense until you realise that the answer is to risk 24% (in my case) of capital on each trade :-0.

I think if you look at this whole area in a quantitative way (and I have, to the point where my gf nearly left me) then all you really learn is that you have to expect big draw-downs, you have to expect a lot of variability in returns and to be able to say something statistically sound about a system/strategy you need to multiply that already large sample size by pi!*


Ben

* That's pi exclamation mark not pi factorial. I am now outed as a geek.

By the looks of that kelly value anyone that used that would be sitting on the sidelines with their head in their hands crying after a short while, even if you had a fantastic winning system.

regards Mark
 
It is useful though (not that this isn't useful!) to calculate a number of equity curves by randomly distributing wins/losses as exactly where these occur can make a surprisingly big difference to the end result.

I agree with Mr Skill Leverage and RedGreenBen, but it can be quantified.

In a theoretically ideal trading scenario, the order of wins / losses will not make any difference to the end result. In theory, your account equity should be at least equal to the sum of your losing trades, in case they all happen off the first ball.

And with such high account equity, looking at your wins/losses, you will always end up with the same result no matter what their order, even with money management - if you're familiar with optimal f (more below).

One thing I've been considering is to use a number of randomly distributed wins and losses to build up a picture of the distribution of maximum draw-downs, so I can see what 1, 2 and 3 standard deviations out from the mean looks like.

In reality it's massively over-conservative to demand a high-enough account equity to deal with all the losses happening in one almighty draw-down.

So you decide what level of risk you can live with. Risk-of-ruin, I mean.

With money management, looking at a wins and losses history, your end result is proportional to the leverage and the account size, based on (a) the biggest loss you think you'll have in the future and (b) the biggest drawdown you're prepared to suffer.

There is an ideal fixed fraction of equity to commit to each trade (in terms of money management) and it's not necessarily the oft-quoted 2% or 5% per trade, and it's not dependent on (b) above - unless it overruns your expectations :(

The fixed fraction is inversely proportional to your biggest loss. Again, you have to decide for yourself what your biggest loss might be, either using your best estimation, or just a number that comes to you in a nightmare, because the markets will guarantee you it is bigger than the one in your wins/losses history in your spreadsheet.



It makes perfect sense until you realize that the answer is to risk 24% (in my case) of capital on each trade :-0.

The calculation is still valid, if you correct the Kelly Formula - which relies on the biggest loss being the one you saw in your trade history.


I think if you look at this whole area in a quantitative way (and I have, to the point where my gf nearly left me) then all you really learn is that you have to expect big draw-downs, you have to expect a lot of variability in returns and to be able to say something statistically sound about a system/strategy you need to multiply that already large sample size by pi!*

Why pi ?
 
Some of you might find this interesting:

Ed Seykota on Risk

He is no paper tiger either, he walked the walk and achieved real life returns of several hundreds of thousands of percent.
 
Top