Saturday, August 20, 2011

Martingales

They appeared in 18th century's Roulette. Let's ignore the bank for a second. You can bet on red or black numbers and the chance to be right is 50% for both. If you are right you gain 1€ for every 1€ you invested. If you lose, you lose everything.

Now, if you play once this is a pretty dangerous game, especially if you invest a lot of money. But you don't have to. In fact, you can use a betting strategy that will make it extremely likely that you will win money in the end. It is called Martingales.

It's not even hard:
1) Bet 1€ on any color. If you lose you ..
2) .. bet 2€ on any color. If you lose you ..
3) .. bet 4€ on any color. If you lose you ..
4) .. bet 8€ on any color. If you lose you ..
5) .. bet 16€ on any color ...

As long as you go on with this system you will always gain 1€ eventually.
For example, let's assume you lose four times in a row, but win the fifth game. You lose 1€+2€+4€+8€=15€. And you win 16€ in the fifth game; 1€ profit. More mathematically, 1+2+4+8...+N^2=(N+1)^2-1

Now, there's nothing that keeps you from starting the same with 1000€ instead of 1€. In that case you always win 1000€ eventually. Of course, casino owners know this. That's why they have a limit.

Let's assume you play with a limit of 100€. To reach the limit you need to lose seven times in a row: The probability of losing seven times in a row is 1/128. That means that on average your strategy is successful 127 times out of 128. And each of these 127 times you win exactly 1€ for a total profit of 127€. But once in 128 games you lose seven times in a row and can't continue, due to the limit. You lose 1+2+4+8+16+32+64=127€. So, on average you make 0€. In fact, it is mathematically proven that there is no strategy that changes the expected value. All you can do is change the structure of the risk; repackage the risk.

Now let's move to financial markets. Let's assume that you have no idea where the stock prices are going to go. So you start playing Martingale. You invest 10,000 €. If you lose, you double, if you win, you start again. Other people in the industry see that although the market is extremely volatile (they win/lose 50% of the time), you win all the time. Consequently they give you their money. This raises your limit. You make more money. A lot of money. Your peers recommend you, because you can turn a risky market into a safe market, it seems. The volatility of your hedge fond (or whatever legal construct you use to pay yourself a very high risk-free salary) is almost non-existent.

Unfortunately, some day, you lose some 20 times in a row. Now that was unlikely .. unfortunately you don't have enough money to double again, and thus, you lose it all. Every single cent.


Next time someone argues that an investment is safe because volatility is low, you hopefully know better.

8 comments:

  1. And then there's the 0 which isn't red nor black.

    ReplyDelete
  2. Yes, the green 0 is the casino's extra supa dupa way of guaranteeing a nice profit.

    ReplyDelete
  3. I'm not sure that works in financial markets. While it is binary in the sense that you either make money or you don't (although it is also possible the stock price doesn't move at all), the actual odds that a stock price moves up or down is based on performance, the economy, and business-level decisions that are not 50/50 chances.

    Let's say I can have either pizza or tacos for dinner tonight. While you can either be correct in guessing which one I'll eat or not, in reality I might be inclined to eat pizza 75% of the time.

    Then again, I only took one Econ class so who knows.

    ReplyDelete
  4. Another issue is survivorship bias.

    You incubate 10 funds and then look at them a couple of years later. Perhaps one or two are great, one or two do horrible... You shut down all the under performers and so even if you are picking stocks with a dartboard, you show a track record of above average performance ... on the ones still in business or that you talk about.

    ReplyDelete
  5. Azuriel, you shouldn't use this exact strategy in the stock market. But it shows what CDOs basically do. They restructure risk. Thus you can create 'AAA' derivatives out of sub-prime mortages.

    Hagu, this bias explains why there are always some funds who beat the market.

    ReplyDelete
  6. > Kring, the 0 is the bank. I ignored it for simplicity's sake.

    The 0 cannot be ignored because it's the reason why Martingales can't work. It's the crash where everyone but the bank looses.

    ReplyDelete
  7. The zero just changes the system from 50:50 to 18:19 against you.

    This means that your expected profit is slightly negative and not zero. You can still use a martingale betting system to repackage the risk any way you want.

    You can still create a 'product' that has a very high chance to make a little profit and a very low chance of suffering a major loss.

    More importantly, the Roulette is just an example here to make understanding martingales and repackaging of risk easier.

    ReplyDelete
  8. Your formula is wrong: 1+2+4+8...+N^2=(N+1)^2-1 needs to be 2^N and not N^2.

    ReplyDelete