Thursday, October 4, 2012

Estimating Distribution of Consecutive Losses Based on Winning Percentages Using Monte Carlo Simulation


A large part of trading (whether it is day trading, scalping, swing trading or long term trading) is determining the psychological toll that the system will take on your psyche.  A system may boast a healthy expectancy but have large drawdowns and make you endure a large number of consecutive losing trades before that big winner comes in.  This can cause you to doubt both yourself and the system you are trading.

I have tried to quantify this in the past by projecting the maximum consecutive number of losses, and by calculating the maximum drawdown (peak to peak) and using the Ulcer Index

Recall that the maximum consecutive number of losses tells us the maximum number of losing trades on average in a given system.  I simulated random data for our trades based on a set winning percentage (number of trades that reached our profit target) and then simulated how many consecutive number of trades hit our stop loss.  This is a useful number but doesn’t really help us on a trade-to-trade basis to determine if our system is performing.

Maximum drawdown brings in both money management and winning percentage.  Peak to peak drawdown refers to the largest percentage loss you endure when trading.  Say you start with $10,000, run the system up to $15,000 and then have a drawdown of $2,000.  This is 20% of your starting equity but only 13.3% of your current equity.  Recall that for our trading system with a $10,000 starting account, 40% winning percentage and a 2:1 win/loss ratio, our statistics looked like this over 1000 simulations of 500 trades:

Maximum Drawdown
Minimum
-2.93%
Maximum
-23.36%
Average
-7.12%
Median
-6.51%
Mode
-6.25%
Standard Deviation
2.47%
Low
High
1-SD (68% Confidence)
-4.65%
-9.58%
2-SD (95% Confidence)
-2.19%
-12.05%
We could be confident that our system should never have more than a 12% drawdown.  If it did, then we would need to step back and examine it to determine if the market had changed.

Ulcer Index measures the depth and duration of percentage drawdowns in price from earlier highs. The greater a drawdown in value, and the longer it takes to recover to earlier highs, the higher the UI. Technically, it is the square root of the mean of the squared percentage drawdowns in value. The squaring effect penalizes large drawdowns proportionately more than small drawdowns (the SD calculation also uses squaring).  In effect, UI measures the "severity" of drawdowns.

For our system above, with a $10,000 starting account, 40% winning percentage and a 2:1 win/loss ratio, our statistics looked like this over 1000 simulations of 500 trades:

Ulcer Index
Minimum
0.83%
Maximum
9.80%
Average
2.41%
Median
2.15%
Standard Deviation
1.06%
Low
High
1-SD (68% Confidence)
1.35%
3.47%
2-SD (95% Confidence)
0.29%
4.53%

What these statistics do not display is the trade-to-trade “grind” that can degrade your ability to effectively execute the next trade.  Should you be worried if you have 5 consecutive losses in a row?  What about 15?  Does it mean that the system has stopped working?  Is it a red flag that you are not executing the trades properly?  Or has something fundamentally changed in the market?

With another Monte Carlo simulation of 500 trades repeated 1000 times, we can begin to get a picture of how many consecutive losses we can expect before a red flag should go up and we should examine whether we are executing the system improperly or something fundamental has changed.

The table below is a summary of this simulation.  Across the top are varying win percentages from 5% to 95%.   On the far left is the average number of consecutive losses that the system had over 500 trades.  A PDF file showing the entire table can be found by going here.




As an example, let’s take a closer look at the system with a 50% winning percentage.

Out of 500 trades, 436 had either “0” or “1”consecutive losses.

Out of 500 trades, we could expect on average that 31 times we would have two losses in a row, 15 times 3 losses in a row, about 8 times 4 losses in a row, 4 times 5 losses in a row, 6 times about 2 losses in a row and 1 time 7 losses in a row.

If you are a “percentages” type person, the table below shows the percent of times you had a given number of losses in a row on average in 1000 simulations.  The full report in PDF format can be found by going here.



These are helpful statistics to have when executing a system.  We know that consecutive losses will occur but now you can tell if they are an “aberration” or in line with what we should expect based on random data.  It may or may not be “okay” to have 5 losses in a row a couple of different times during your trading.  Furthermore, it can help you with money management – if you know that a given number of losses in a row is the max number of losses in a given system, make sure you have enough capital to withstand that type of drawdown.

Keep ya mind right and happy trading.


No comments:

Post a Comment