## Thursday, 21 February 2013

### Another day older and deeper in debt

There's a famous, famously lousy betting strategy which is referred to as the Martingale.  The simplest characterisation is as follows.  You're faced with a betting game based on tossing a coin. You place a bet of any size you care on the outcome of the coin toss.  If you're right, you get your original stake back, doubled.  If you lose, you lose your stake.  You'll see it referred to as 'doubling down' also in the context of trading - this is a looser variant where you're raising your bet size as the market goes continually against you.

With the Martingale algorithm assisting you with placing your best size, then if you are infinitely wealthy and are prepared to toss the coin infinitely often, you can construct a winning strategy.  Interestingly, the strategy is nothing whatsoever to do with actually predicting the outcome of the coin toss.  It is all about how big a bet you place on any of the sequence of coin tossing games you participate in.  You bet an initial stake on the first toss.  if you win, you're richer by the initial stake.  if you lose, you play the game again, doubling the best size.  If you win, you get back your second stake, plus the same again.  That extra second iteration stake fully makes up for the loss of the initial stake, and you're left with an initial stake's worth of profit.  Repeat and become rich beyond your wildest dreams.

In practice, the gambling institution (or your own finite wealth) will impose bet size limits, which dramatically increases the chances of gambler's ruin in a short losing streak.

Lying under it is the gambler's fallacy, the belief that in an evens game, wins and losses even out.  That is, people dramatically underestimate the likelihood of a long string of losses.  As you burn exponentially though your cash pile, each independent evens bet doesn't care where it is in the history of your losses or wins.  Each future toss is either just a win or a loss.

In the context of trading, the poorest reasonable assumption to be made about you is you are no better than a random process when making a call on a binary market outcome.  However this is not always going to be true, since markets do exhibit runs and reversals.

The doubling down strategy might have its origin in that part of Kahneman's prospect theory which states that when you've made a big loss, you're more likely to roll the dice to break even, rather than the rational path, which is to reduce your risk sizing and wait for the market to pick up again.  Your bets get exponentially bigger in order to 'pay' for the thrill of reversing luck in the very next bet.  But in practice with real trading, you might be happy with recovery of your losses over a number of bets.

The above scenario concentrated on a use case which exhibited extreme downside behaviour against you and had a distinct Martingale-like feel to it, but certainly doesn't strike me as a prospect theory like bias.

So if an alien came down and examined the set of trades on a market and saw Martingale-like trading patterns, they couldn't really say this was because of a prospect theory bias reason or because of a more healthy conservative opening strategy.

If this is the case, then any time you come across a trading book with dismisses Martingale-like trade sizing algorithms out of hand as wrong, or as evidence of a prospect theory kind of bias, then you know they're not telling you the full picture.  On the flip side anyone suggesting a Martingale like sizing strategy is probably giving you bad advice.

Two more points to make on this.  First, the theoretical Martingale is marked theoretical due to the house limits or the wealth of the player.  Another angle on this is to say that the real unspoken criterion here is the minimal bet size (and the frequency of bets).  If there was a market where the minimal bet size was a tiny fraction of a cent, and you could trade it hundreds of thousands of times a second, then you're moving a lot closer to getting it to work as a winning trade sizing strategy.

Second, this dovetails with a piece of mathematics called the gambler's ruin, which is often seen in probability textbooks showing how long you have got before any given fixed outcome gamble exhausts your initial wealth.

A Martingale is also the name given to the strap which attaches around a horse's neck and to its body, keeping its head in a narrow, froward looking position.  The analogy was in the classical bet sizing strategy which calculated the expected profit or loss at time $t$ to be the current size of the winnings pot at time $t, W_t$.  Apparently there was a French village Martique which had famously miserly inhabitants.

Paul Levy in the 1930s took the word and applied it to one of the two basic properties of randomly generated numbers which would result in them being normally distributed.  The other was finite variance.