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.

Surely there are circumstances when a trading strategy somewhat like the Martingale one makes sense? First of all, assume you're putting on a trade with no better than evens odds, as per the original Martingale theory.  Now, suppose you had 1,000,000 currency units to allocate to this bet.  Well, you could just put the lot on this bet.  But you don't know the future, so you could foresee a couple of trading periods where the investment moves against you.  Why not put on 100 units initially.  If the market moves against you, continue to buy into the position in 100 unit chunks  - I assume that nothing changes in your trading thesis. As long as your trading thesis looks OK, you're getting to buy in at a price even better than at the starting period, and you were happy to buy in then.  You wouldn't need to increase the bet exponentially since you don't need to pay for the thrill of a dramatic single jump to profit in one trading period.  You'd be able to last for a much longer bad run, each time buying in at a lower average price.  Again, assuming nothing changed in your trading thesis, you could at worst imagine 10,000 trading periods all going against you, before you exhausted your overall trade limit of 1,000,000 units.

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.