The St Petersburg Paradox21/8/2020
Let me introduce a game – I keep flipping a coin and you have to guess whether it will come up heads or tails. The prize pot starts at \$2, and each time you guess correctly the prize pot doubles, we keep playing until you eventually guess incorrectly at which point you get whatever has accumulated in the prize pot.
So if you guess wrong on the first flip, you just get the \$2. If you guess wrong on the second flip you get \$4, and if you get it wrong on the 10th flip you get \$1024. Knowing this, how much would you pay to enter this game? You're guaranteed to win at least \$2, so you'd obviously pay at least $\2. There is a 50% chance you'll win \$4, a 25% chance you'll win \$8, a 12.5% chance you'll win \$16, and so on. Knowing this maybe you'd pay \$5 to play - you'll probably lose money but there's a decent chance you'll make quite a bit more than \$5. Perhaps you take a more mathematical approach than this. You might reason as follows – ‘I’m a rational person therefore as any good rational person should, I will calculate the expected value of playing the game, this is the maximum I should be willing to play the game’. This however is the crux of the problem and the source of the paradox, most people do not really value the game that highly – when asked they’d pay somewhere between \$2-\$10 to play it, and yet the expected value of the game is infinite....
Source: https://unsplash.com/@pujalin
The above is a lovely photo I found of St Petersburg. The reason the paradox is named after St Petersburg actually has nothing to do with the game itself, but is due to an early article published by Daniel Bernoulli in a St Petersburg journal. As an aside, having just finished the book A Gentleman in Moscow by Amor Towles (which I loved and would thoroughly recommend) I'm curious to visit Moscow and St Petersburg one day.
Actuarial modelling and the St Petersburg paradox
How would we assess this contract from an actuarial perspective? In order to price the contract we are going to have to introduce a couple of new ways of looking at it, as we noted above simply calculating the expected value is of limited value as this suggests we should assign an infinite value to the game. First, let’s think in terms of credit risk, how much money do we think the counterparty is good for? Let’s say that we have no idea how much our counterparty can afford, but as a general principle we can certain say that it will be less than the total amount of money in the world. Carrying out some ‘desk research’ i.e googling this question reveals that there is of the order of \$90tr of ‘broad money’ in existence globally [1]. This includes not just hard currency such as coins and notes, but also money saved in saving accounts, and invested in money markets. Using this as our upper-limit payout, how many flips would be needed to reach \$90tr? Well $log_2(90bn) = 46.4$. So any winnings which involve more than 46 correct flips involve being paid more than the total amount of money in the world. Let’s therefore use this as our maximum winnings. Using this, instead of our expected value being: $$E[X] = \sum_{i=1}^{\infty} 2^i \left( \frac{1}{2} \right)^i = \sum_{i=1}^{\infty} 1 = \infty $$ It becomes the following: $$E[X] = \sum_{i=1}^{46} 2^i \left( \frac{1}{2} \right)^i = \sum_{i=1}^{46} 1 = 46$$ All of a sudden our expected value is very much finite, and is not even that big! Paying more than \$46 to play the game suddenly seems foolish. Now that we have looked at the contract and decided that in practice it does not have an infinite expected value, we can use the amended version with finite expectation to also calculate the standard deviation of our expected winnings. Using the usual formula for standard deviation, and the version of the game limited to 46 flips, we arrive at a value of 11,863,283, or equivalently a coefficient of variation of 257,897, pretty ridiculously high! With actuarial contracts, we might think that a modelled CV about 0.3 is high, let alone multiple hundreds of thousands. This EV of \$46 is about as far from a sure thing as you can get. This suggests that we should pay a lot less than \$46 to account for the volatility. If someone put a gun to my head, what value would I put on this contract? As a very quick metric we could price it by saying that we will ignore any upside which is outside of a 1-in-200, which means all my upside comes from the first 8 flips, this suggests that I might pay \$8 to play it, which feels about right to me. High frequency trading and the St Petersburg paradox Here is another variation of the game which I thought might be interesting. Suppose instead of playing the game once, you paid an upfront amount to play the game for one hour straight, using a computer to flip a virtual coin. In order to insert some realism into this, we are going to have to define how quickly we can play the game, here is one scenario which is slightly arbitrary but provides one benchmark. What if we can play the game roughly as many times as the biggest high-frequency trading firm trades in one hour. I thought this would be an interesting scenario, suppose the ability to play this game was auctioned and firms could play it a similar number of times as some of the bigger high frequency traders trade in a given day, what would this look like? Based on the following WSJ article [3], the largest HFT firm is someone called Virtu Financial (never heard of them to be honest!), exactly how many trades they make per day is not public record, but the article estimates it’s of the order 3 million per day, or approx. 462,000 trades an hour based on the standard opening hours of the NYSE. I would have guessed it was more than this, but I guess their operating model is more about the speed of trades rather than the volume? Next we are going to need to simulate the game, I used the following code in Python. I’m sure other people can come up with a faster implementation than me, but it seems to serve my purpose. My computer can play around 500k games per second, which means I can simulate an hour of ‘trading’ in one second which makes it quite easy to run. from random import random import matplotlib.pyplot as plt inc = np.empty([462000,40]) cml = np.empty([462000]) for Play in range(462000): Flip = 1 Prize = 2 j = 1 while j == 1: if random() < 0.5: inc[Play,Flip] = Prize Prize = Prize * 2 Flip = Flip + 1 else: cml[Play] = cml[Play-1] + Prize j = 2
I wanted to see what this would look like in real life, so I set up 100 simulations of one hour slots of playing game, this time using the code below.
Simulations= 500 cml = np.empty([462000,Simulations]) for sec in range(Simulations): for Play in range(462000): Flip = 1 Prize = 2 j = 1 while j == 1: if random() < 0.5: Prize = Prize * 2 Flip = Flip + 1 else: cml[Play,sec] = cml[Play-1,sec] + Prize j = 2 plt.style.use('seaborn-whitegrid') plt.title(str(Simulations) + " Simulations of cumulative winnings in one hour of playing") plt.xlabel("Game number"); plt.ylabel("Cumulative winings") plt.plot(cml)
I then created a chart showing the evolution of winnings over time. Each individual line represents a simulation of playing the game for an hour. As we move from left to right we see the cumulative winnings from our 460k flips which we can fit into an hour.
We can see from the chart that most games give a fairly modest and stable payout. There is one outlier, that ended up returning a massive \$1trn+, we'd expect this given the volatility. Most of the other simulations were focused around the \$100m range.
Another version of the game
The version of the game presented by Daniel Bernoulli is not even the ‘worst’ version one could come up with which still has an infinite expected value. Here is a variation with an even slower rate of divergence. Suppose we are still flipping a coin at each trial, but instead of the payout being $2^i$, it is instead, $\frac{1}{i+1} 2^i$. This value has been deliberately selected so that the expected value becomes: $$E[X] = \sum_{i=1}^{\infty} \frac{1}{2^i} \frac{1}{(i+1)} 2^i = \sum_{i=1}^{\infty} \frac{1}{i+1}= \infty$$ This is the famous divergent series from a first year calculus class called the harmonic series, even though the summands tend to 0, the sum is still divergent, i.e. sums to infinity. Making the same constraint as above, whereby the maximum pay out is \$90tn, the expected value of such a game is now tiny, it is: $$E[X] = \sum_{i=1}^{46} \frac{1}{2^i} \frac{1}{(i+1)} 2^i = \sum_{i=1}^{46} \frac{1}{i+1} \approx 3 $$ So we’d pay even less to pay this version than the original version, less than \$3, yet it still has infinite expected value. References: [1]www.marketwatch.com/story/this-is-how-much-money-exists-in-the-entire-world-in-one-chart-2015-12-18 [2] mathworld.wolfram.com/HarmonicSeries.html [3] https://online.wsj.com/public/resources/documents/VirtuOverview.pdf |
AuthorI work as an actuary and underwriter at a global reinsurer in London. Categories
All
Archives
April 2024
|
Leave a Reply.