Backtesting: Martingale Strategies

CtrlAltDaveLarge“We didn’t lose the game; we just ran out of time.”

Vince Lombardi

The Martingale System is often mentioned and even requested by many traders.

It tempts many with a simple order sizing system, and taunts them with high rewards for little effort. For those unfamiliar, the basic Martingale System says to double the order quantity after each loss, and to restart at a predetermined quantity after each win.

There are several variations but all revolve around greatly increasing the trade size. It is commonly associated with gambling, a favorite on Roulette in particular. Last week, we saw an overly-optimised, completely random strategy outperform even most dreams. This is also a random strategy, using the Martingale System with 50 pip target profit and stop loss.

martingale chart

There are several kinks, but otherwise a straight line upwards of 1054 trades in just over 13 months. 39% win rate, and 1.72 win/loss ratio. I did not even use any optimisation to find the seed for the random number generation. So easy with Martingale, even a random strategy makes money!

So where is the problem?

martingale trades

This shows the trades following the chart above. The system only works for as long as you have enough money to allow you to always double down. Actually by the second week of the backtest, it lost 7 times in a row which grew the trade size to 128 times the original starting value.I started with a single mini-lot, so this represents 12.8 full lots. However, on this last day, it failed 15 times in a row which meant it had to trade 3276.8 full lots to make back the money already lost.

It can appear profitable for many trades over several years, but any strategy based upon Martingale has the potential to blow up your entire account. It is remarkably easy to create such a strategy which appears fine yet has this underlying risk.

When checking the performance of public strategies in the future, always look if the trade sizes double in size in a similar fashion.

Then stand well back, preferably behind a large rock, and cover your ears.