# Playing Cards with the Market Mistress, by Henrik Andersson

February 7, 2007 |

I was playing with the thought of analyzing the market with the help of a card game analogy. Assume you have a deck of cards with the daily returns for the last five years for the S&P 500. If you draw the cards one by one what would the optimal strategy be, that is, when would you stop in order to maximize your return?

This doesn't seem like an easy problem to solve by hand, so I performed some Monte Carlo simulations. With a simple fixed return-based stop, it seems like a maximum return can be achieved by stopping when you are at around 50% return for an average return of some 40%. The average waiting time for this game strategy is almost 3 years.

For the last five years the S&P 500 moved from 1090 to 1447, a 32.75% return. I believe a more complex analysis of this kind could possibly yield some interesting results. This was inspired by a question in "Heard on the Street: Quantitative Questions from Wall Street Job Interviews" by Timothy Falcon Crack, where one is asked to calculate the optimal stopping rule from 52 playing cards if red cards pay you a dollar and black cards fine you a dollar.

## Philip McDonnell writes:

If the market truly has a long term upward drift then there is no good stopping point. In a sense this may be the wrong question. Perhaps the better question is when to enter the market with new money or when to increase one's leverage. The idea is that this implicitly recognizes that buy and hold is very difficult to beat.

The market also differs from the card deck in that the investment horizon is very long, not just 52 known cards. Another difference is that the card deck analogy is a model without replacement. If you have seen unfavorable cards so far then one need only stay in the game to the end to be guaranteed at least a break-even outcome. One is guaranteed a form of mean reversion because cards are drawn without replacement. To assume that the market distribution acts in a mean reverting fashion is a major assumption which should be tested first.