Guest Post by DV34

DV34 has shared his practical experiences backtesting trading strategy in a series of posts. In this final post he outlines some of the issues involved in incorporating your position sizing strategies into backtesting.

As per my original backtesting article the next phase of manual backtesting involves applying position sizing strategies to meet your objectives

This will be the last article in my backtesting series, so it might be slightly longer than usual

E) APPLY POSITION SIZING STRATEGY TO KEEP RISK WITHIN OBJECTIVES

Using Position sizing strategies to manage your risk to an acceptable level

  1. Be aware of win% vs. drawdown, Lower win% = Larger drawdown’s i.e. Monte Carlo Simulation
  2. Note larger position size = greater account volatility – both positive and negative
  3. Develop worst case contingency plan

Now the basic position sizing strategies fall into one of a few categories, namely:

a)      Fixed unit/ No. lots per ‘X’ dollars in account style position sizing

b)      Martingale Position Sizing

Increases position sizes during drawdowns, assuming the larger position size will recover from prior losses faster

c)      Anti-Martingale Position Sizing

Decreases Position sizes during drawdowns, increases during gains) i.e. fixed fractional. Fixed % etc

d)      Dangerous Models… Kelly, Optimal F etc

These tend to be extremely aggressive, with a high risk of blowing up account!

And cannot withstand strings of losses well, anywhere between 20-33% of account risked/ per trade

Now this is not going to be an exhaustive guide to position sizing strategies, there are plenty of good books focused on money management and position sizing with the pro’s vs cons of each method discussed in detail.

One such book is Van Tharps ‘Definitive Guide to Position Sizing’ a book that I think has not received as much recognition it deserves

For the purposes of this article I am going to keep things simple and use a fixed % of account (anti-martingale) position sizing rule, it is probably one of the most common methods and easy to work with

Now, my original objective was to keep my account at less than a 15% peak to valley drawdown, of course this may be exceeded, but I want to use testing and statistics to try and minimize the possibility

To do this I am going to use the statistics we used earlier and the monte carlo calculator to work out what my likely series of losses in a row would be and use this as a benchmark.

To recap, the summary of statistics is below:

Backtesting Statistics Click to Enlarge Backtesting Statistics
Click to Enlarge

What I am aiming to do is work out the probability of a drawdown equating to -15R

In my back test of 215 trades the maximum series of losses in a row was 5 trades, and the maximum drawdown was -4.9R

 

Probability of Streaks of Losses

(Spreadsheets Source: www.daytradinglife.com – Credit to DowBoy (forexfactory) for his great work!)

Backtesting. Probability of a losing streak Backtesting. Probability of a losing streak

Based on my average 61.9% winning percentage, you could be looking at a 10% probability of 8 losses in a row and 1% probability of 10 losses in a row

Probability of Runs of Losses

Multiple losing streaks matrix Multiple losing streaks matrix

Looking at the monte carlo tests, it is quite likely we will see a series of losses between 8-11 trades in a row, also what I found interesting is that it should be considered ‘normal’ to have streaks of losses between 4-6 trades with quite a high probability of 69.92% of having the maximum 5 loss streak that I actually measured in my test

What this ultimately tells me is that my tested drawdown of 5 losses is really worthless…!

My position sizing should be far more conservative than my measured result…

I mentioned in an earlier post what I called the ‘megaphone effect’, basically increasing your position size increases your potential gains, but also increases your potential draw downs simultaneously!

Equity Curve showing various position sizes

As you can see, relatively minor changes in position sizes of only 0.5% makes an exponential change to the equity curve, which is probably why most traders stay between 0.1-2.0% risk/ trade range

Backtesting Equity Curve Backtesting Equity Curve

Draw down chart showing various position sizes

(Note: -5R Measured Max Drawdown! – not 8-10x!)

Backtesting Drawdown Chart Backtesting Drawdown Chart

Based on the fact that my test only showed a -5R max loss, but my Monte Carlo testing shows a 1.3% chance of a 10 loss losing streak so I think risking 1.5% risk per trade should give a ~1% chance of a losing streak drawdown in excess of -15% - that would be a pretty bad losing streak for a 62% winning system!

Now I know that maximum draw down calculations and chances of streaks of losses are very very different as a maximum drawdown often includes multiple series of losses,

It is quite possible to have a max drawdown much greater than this, but I do not know of any other tools that can give you accurate statistics easily based on your winning % vs drawdown.

If somebody knows of a great tool please pass it on!, I would be thrilled to find a good one that is easy to use!

Ok so lets get to the good part, what does it all mean? Well – here is a simple equity model based on a $10k account (with a few bugs in it J

a)            It assumes all profits are reinvested year over year, excluding all tax deductions/ withdrawals

(i.e. not reality..)

b)            I deducted 0.05% position sizing to allow for swap/ rollover costs and negative rounding in position sizes

Backtesting Equity Curve Backtesting Equity Curve

Gain vs. Pain Ratio

Backtesting Gain v Pain Ratio

Optimisation?

The charts above are based on 61.9% winners, which was the average winning %,

If you look closer though the longs won 69.7% and shorts won only 51.6%.

This naturally raises the question that you could possibly increase your position sizes for long trades and reduce the position sizes for short trades? the low win% of short trades would likely be the area causing the deepest draw downs…

Well, only one way to find out..!

Recreating the process above based on the optimal position sizing for longs vs. shorts

Long Risk = 1.87%/ Trade

Short Risk = 1.15%/ Trade

‘Optimised’ Equity Curve (with Long Trade Bias)

Backtesting Optimised Equity Curve Backtesting Optimised Equity Curve

‘Optimised’ Gain vs. Pain Ratios (with Long Trade Bias)

Backtesting Optimised Gain v Pain Ratio Backtesting Optimised Gain v Pain Ratio

Now I am not advocating this approach at all, and do not really believe in optimisation at all, which is akin to curve fitting historical data.

I typically use a flat %/ trade for all trades so I only showed this for interest sake only

However, in this case it is interesting to see the impact it has using a different position sizing technique

By giving the strategy a long vs short bias we:

a)                  Improved the gross profit from $140,867 to $183,859 = $42,992 (+30% difference) although this does exclude taxes which would decrease this – a lot…

b)                  Decreased the maximum drawdown tested from -6.9% to -6.4%

c)                  Decreased the most important volatility of the account which is the downside!

(Few people complain about high volatility to the upside…!)

Now this was again for 1x pair/ 1x time frame trading specific correction patterns only and using even a modest 1.1-1.8% risk per trade were still able to produce some great results, most of these years only had an average of 18 trades a year, which is both a positive and negative

The worst case contingency plan would be setting rules about what happens if 10 loss streak, or the 15% draw down is exceeded, for me that would be a stop trading the strategy for a month and a trade review

For the most part, the strategy accomplished my objectives excluding 2007, my objective was to create a strategy that made as much money as possible while limiting my maximum downside drawdown to -15% and had an annual gain/ pain ratio of 2.0 or higher

I focussed on downside risk first - then profit second, we tested only a 5 losing trade drawdown but noted statistically that it could have a 1% chance of 8-10 trade losing streak (or more) and therefore position sized a lot more conservatively than the test suggested

Optimising for long vs short trades improved our profitability while decreasing the draw downs as expected, but this also adds a level of curve fitting which may or may not be appropriate as we do not know the long term bias for the future!

Well, the acid test is live forward testing with real cash that I am doing now, we will see how it works!

All in all, I hope this series helped explain some core concepts in a practical way; it has been great for me to try and clarify and solidify some of these concepts for my own trading

I thank you all for your patience in reading my sometimes wordy articles and I wish you all the best in your trading in the future!

DV34