We should've stopped--but let's keep going and see what happens.

Hedging Bets


This is a fun little thought-experiment. I’m not detailing anything our friends in finance and business don’t already know, but it might be something entertaining to chew on if you are (as I am at this moment) stuck on a bus and needing something to do.

A system for gambling

My mother had a rule for gambling, passed down through her family:

When you go into the casino, put the money you’re betting in your left pocket. Whenever you win, put the winnings in the right pocket. You can keep gambling as long as you have money in either pocket. Once your pockets are empty—you stop.

The intent of this system is to:

  • Prevent the mixture of winnings with principal.
  • Give the option of “reinvesting” winnings.
  • Most importantly, to place a hard limit on losses.

So, why do we care about this?

A worldwide casino

Let’s play with this system and see if we can get any insights for larger-scale gambling.

The game we play is simple. The player state is:

  • D0 the initial liquid funding of the player.
  • D the amount of liquid funds available.
  • N the number of tickets a player owns.

The game state is:

  • T the time elapsed in the game since the start time, T_0.
  • P_ticket the current purchase/selling price of a ticket.

The rules are:

  • Tickets are completely fungible—you can buy fractional tickets.
  • Every time period dt, you can buy zero or more tickets at price P_ticket(T), up until you’ve exceeded D. Each purchase is deducted from D.
  • Every time period dt, you can sell zero or more tickets at price P_ticket(T), until you’ve exceeded N. Each sale is credited to D.
  • Every time period dt, P_ticket will monotonically increase by some amount.
  • At some time T_ohshit, P_ticket will begin plummeting.

The goal conditions:

  • You win if you walk away with more money than you started with.
  • You lose if you walk away with less money than you started with.
  • You draw if you walk away with the same amount of money you started with.

Trivial strategies: not playing

So, the simplest strategy is to not play at all. Take the funds and walk.

This prevents any possible lose conditions, but similarly prevents a win. A draw is assured.

Alternately, immediately buy all of the shares possible (floor(D0/P_ticket)) and sell them on the subsequent timestep.

Unless T_ohshit is happens at T=dt, you’re guaranteed a neglible profit.

Stupid strategy: Ride the wave

The strategy

Until T_ohshit, you know that buying a ticket will only get more expensive than at T_0. Thus, it makes sense that the cheapest time to buy a ticket is at the very beginning, so you should do that.

Now, the best time to sell is going to be at T_ohshit—but you won’t know that time has come until T_ohshit + dt. At which point, since the price is plummeting, you know the best time to sell is as soon as possible.

So, you say “Aha angersock, I will buy at the first timestep and sell at the moment I think T_ohshit has passed.”

Analysis of the payout

The profit is going to be equal to the revenue of the tickets sold less the cost of the tickets purchased.

In our case, that is:

Profit = Revenue - Cost

We can expand that out:

Profit = ( N * P_ticket( T_ohshit + dt ) ) - ( P_ticket(0) * N )
Profit = N * ( P_ticket( T_ohshit + dt) - P_ticket(0) )

Now, given that we purchased all of our tickets at the beginning, we know N:

N = D / P_ticket(0)

And so:

Profit = D / P_ticket(0) * (P_ticket( T_ohshit + dt ) - P_ticket( 0 ) )
Profit = D * ( 1 - P_ticket( T_ohshit + dt ) / P_ticket(0))

Not super impressive, but it reassures us that rudimentary microeconmics still works. Note though that the profit is directly dependent on the amount of funds spent in the beginning!

Flaws and assumptions

There are some problems with this, in practice:

  • What if my cat eats my router and I don’t catch the timestep directly after the crash? How long do I have before I’m not longer profiting?

  • What if the ticket price changes really drastically in like one time step?


That’s it for now. Next time we’ll:

  • See what more conservative strategies we can play
  • See how to bound the risk of missing the T_ohshit event.
  • See if we can adapt to a removal of the monotonically increasing and decreasing assumptions.