# How to Lose a Fair Game

Part 3 of the _Inefficient Markets_ sequence.

[I am not your financial advisor!
Examples are illustrations of principles for educational purposes only,
to help you make your own financial decisions with due diligence.
Read [part 1](https://www.lesswrong.com/posts/rPe6b7MCxaK8ZzYdC/you-need-more-money) first.]

Suppose I offer you a deal:
You will flip a fair coin.
If it's heads,
I will pay you a dollar.
If it's tails,
you will pay me a dollar.

Does this game strike you as unfair?
Does it seem dangerous?
Your expected value is zero.
If we iterate this game,
you'll experience some gains and some losses,
but they will tend to even out over time.
So if anything, it's pointless.
Entertaining maybe,
but _dangerous_? No, not really.

Now suppose I let you bet any number of dollars X.
If you win, you will pay me X dollars.
If I win, I will pay you X dollars.

Is this game unfair?
Is it _dangerous_?
How much should you bet each game?
What is your expected value?

It's the same deal, right?

Not quite.

If you bet all of your money,
you could double your money,
or you could lose all your money.
If we iterate,
and I have enough dollars to pay off your winning streak,
you are almost certain to eventually flip a tail and lose.
Now I have all of your dollars,
and I keep them,
because you can't afford to play.

# The Second Law of Averting Ruin

**Don't Bet the Farm**

I surreptitiously gave myself a massive advantage in the second game.
I said "I have enough dollars to pay off your winning streak".
The player with more money has a massive advantage.
But if you are betting against "the market",
you had best assume that "the market" has a lot more dollars than you.

## Kelly's Optimal Strategy

I will not derive the formula here,
but the optimal betting strategy is to bet a certain fraction of your bankroll.

For an even-money bet, the formula is simply

$fraction = P(win) - P(loss)$

The fraction is only 1 if the probability of winning is also 1.

The [Kelly formula](https://en.wikipedia.org/wiki/Kelly_criterion) becomes more complex if it's not an even-money bet.
It must be computed from the _distribution_ of payoffs (including negative payoffs).

It's important that you understand this formula exists for the insights it provides,
that the optimal strategy is to bet an optimal fraction,
that underbetting will underperform,
overbetting will underperform,
that double the fraction has an expected growth rate of _zero_,
and for anything bigger than that it will be _negative_,
so Betting the Farm is a sure path to **ruin**,
but we can't actually use it,
because in practice we can't know our payoff distribution!

We can only _estimate_ it from past data,
and the market conditions shift over time.

## You Are not Using Enough Leverage

Depending on the distribution of payoffs,
it is possible for the optimal Kelly fraction to be over unity.
This tends to happen when losing your bet doesn't mean
losing _all_ of your bet.

Now how can you possibly bet more than your bankroll?

Borrow money.

If you sign up for a margin account with your stockbroker,
your broker will loan you the money to buy more shares of stock,
using your shares as collateral for the loan.
You can obtain twice the growth as the price goes up,
because you can afford twice as many shares for the money.
This is one example of a core trading concept called _leverage_.

Double the returns sounds great,
until you realize that returns can also be negative.
Your losses will double too.
Leverage is a double-edged sword.

Individual stocks can and do drop to zero
(or close enough to it that it makes little difference to you),
but an index like the S&P 500 can only drop to zero if
all 500 of America's biggest companies drop to zero _at the same time_.
Not likely.

Historically,
we can see that the optimal leverage factor for U.S. stocks would have been about 2x.
Nobody can know what the future payoff distribution will be,
but 2x seems like a good prior.

A word of caution: some brokers charge outrageous amounts of interest for margin loans.
Consider a more reasonable broker.
(You can sometimes circumvent this by using box spreads to borrow from the market instead
at a better rate.
These are dangerous if you don't know what you are doing.)

## I Can Beat the Index

Remember the Very Basic trading system from last time?
It was a stupid-simple balanced portfolio of `SPY` and `TLT`.
(Tracking the S&P 500, and 20-year U.S. Treasury Bonds, respectively.)

Well, here's a slightly better trading system.

One reason I picked those two is because these ETFs have 2x leveraged versions:
`SSO` and `UBT`.

Leveraged ETFs are another way to obtain leverage that do not require a margin account.
These are not as flexible as a margin account,
because you can buy almost anything on margin,
but leveraged ETFs are only available for certain things.

The backtested performance of a portfolio of 100% `SPY` (the S&P 500 index)
from February 2010 through July 2020 was a [compound annual growth rate](https://en.wikipedia.org/wiki/Compound_annual_growth_rate)
of 12.7%
with a volatility of 13.11%, and a maximum drawdown of -19.43%.

The backtested performance of 50% `SSO` and 50% `UBT`
(rebalanced at 10% absolute deviation)
over the same period was a CAGR of 21.75%,
with a volatility of 14.41% and a max drawdown of -13.46%.

That's superior to the index by almost every measure.
Bonds zig when stocks zag, so the volatility of their sum is barely more than `SPY` alone,
but the returns have almost doubled due to the 2x leverage.

That's a [Sharpe ratio](https://en.wikipedia.org/wiki/Sharpe_ratio) of 0.93	for `SPY`
and 1.4 for `SSO`/`UBT`.
Sharpe ratio is a measure of risk-adjusted returns.
Two portfolios with the same Sharpe would have about the same return if leveraged to the same volatility.
You can approximate the Sharpe ratio by dividing the annual return by the volatility. (The real formula also subtracts out the [risk-free rate.](https://en.wikipedia.org/wiki/Risk-free_interest_rate))

The astute reader may notice that this time frame conveniently avoided the 2008 crisis.
Unfortunately, these leveraged ETFs weren't available back then,
so there's no data.
But it does include the recent corona crash, and did fine.
We can, however,
look at how a portfolio of `SPY` and `TLT`
would have done over that period if leveraged to 2x using margin.
It turns out to still have about 17% CAGR, and a superior Sharpe ratio vs 1x `SPY` alone over the same period.
Past performance cannot guarantee future results.
But I have to wonder,
why isn't everyone doing something like this?

If your Sharpe ratio is over 1.0, you're doing well.
As you can see, this system is still stupid-simple and it got all the way up to 1.4.
Trading does not have to take a lot of effort to be worth your while.

But we can do better. Aim for 2.0.

## You Must Know When to Leverage Down

![SVXY](https://i.postimg.cc/0Q5yKzn4/SVXY.png "100% SVXY")

This is a backtest showing the growth of a $10,000 portfolio of 100% `SVXY`.
Look at that ride.
Years of high-powered heartburn,
and then in 2018,
following a race to almost $200,000,
in a moment of pure terror,
it falls off a cliff.
For a final CAGR of just 3.09%.
What was it all for?

Doesn't that look like fun?
Is this something you'd like to buy and hold?
No?
DON'T PANIC!
Sarcasm aside,
that is _exactly_ what makes it go up so hard: [risk premium](https://www.investopedia.com/terms/r/riskpremium.asp).

And that is why it's a great investment.
No, I _am_ serious, look at this chart compared to 100% `SPY`:

![SVXY versus SPY](https://i.postimg.cc/bvDKCpJv/SVXYvSPY.png "100% SVXY (blue) vs 100% SPY (red)")

It was doing so much better until it wasn't.
Nevertheless, 3% is not a great return.

`SVXY` is a great illustration of what we call [negative skew](https://en.wikipedia.org/wiki/Skewness#negative_skew).
If you plot its distribution of daily returns
(the difference between daily close to daily close prices) as a histogram,
you'll see a distribution that kind of looks like a bell curve,
but has a long tail on the left representing those times when it suddenly drops.
You Do Not Bet the Farm when trading,
_especially_ when there's a negative skew.
Stocks and bonds also tend to skew a bit negative,
but `SVXY`'s return distribution is especially dramatic.

Remember the Kelly fraction is computed from the payoff distribution.
The optimal leverage for any given trade is unlikely to be 1x.
As we saw for our stock portfolio, 2x was much better.
But in this case, even 1x is too much.

How do you leverage less than 1x?
Don't use the whole bankroll.

Here's 50/50 `SVXY` and cash,
rebalanced at 10% absolute deviation,
with 100% `SPY` as a benchmark again.

![half SVXY versus SPY](https://i.postimg.cc/NFHFBWpG/half-SVXYv-SPY.png "50% SVXY (blue) vs 100% SPY (red)")

We can see it's outperforming the `SPY` portfolio almost the entire time,
until the corona crash,
but even now, it's got a very respectable 12% CAGR.

Just by leveraging down to 0.5x,
`SVXY` has become a valid investment it its own right,
but it's not a great fit for our simple rebalancing system.
You don't have to leave cash in your portfolio to leverage down.
You just need something to balance it with.
Some other uncorrelated asset would work.
Equal weights of `SVXY`, `SSO`, and `UBT`
does perform a bit better (in a _backtest_),
but given the levels of volatility involved,
how well that might do in the future is really uncertain.
And `SVXY` has a .68 correlation with `SSO`,
so it doesn't diversify all that much.

It's probably not worth it, but neither is it insane.
If we could somehow avoid or mitigate even a few of those drops,
`SVXY` would be a powerful addition to our system.
And if our avoidance or mitigation fails,
we're probably doing no worse than `SPY`.
More on that idea later in the sequence.

## Don't Put All Your Nest Egg in One Asset. Use a Basket.

"Don't Bet the Farm" is a warning about overallocating your trades.
Leveraging too high is not the only way this can happen.

Diversification is not about the number of tickers in your portfolio.
Trading multiple assets that are too correlated is another way to Bet the Farm.
The stock market as a whole shows a great deal of correlation with the S&P 500.
Just because assets _seem_ different, doesn't mean they are.
Don't rely on intuition here.
Run the numbers. Look at the correlations.
Correlations also shift over time.
That you were diversified before doesn't mean you are now.

## A Somewhat Safer System

Our last system had only two assets: `SSO`, and `UBT`.
Diversification is not about the number of tickers.
`SSO` tracks an index of 500 different stocks.
And the bonds are nicely anticorrelated.
This is already a lot more diversified than a portfolio of two stocks.

How hard would it be to diversify more?
We would need an asset that isn't bad to buy and hold
and not very correlated with either.

I have a candidate in mind.
`UGL` is a 2x leveraged ETF tracking the price of gold.

Our 50/50 allocation was rather simplistic.
Why that instead of some other number?

Equal weight of one-third each would work OK,
but I think we can do better.

Correlations can shift over time,
but so can payoff distributions.
We can't really know what those are,
which makes it hard to use Kelly sizing,
but do keep the principles we learned from Kelly in mind.

We can compute the average volatility of each asset over the last month,
which turns out to be a pretty good estimate of tomorrow's volatility for that asset.
This may be a good enough proxy for the payoff distribution to be useful in sizing.
We know that more volatile assets can drop faster,
so we'll give them a lower allocation to reduce risk.
The less volatile assets need more leverage to produce enough return,
so we'll give them higher allocation.

This type of allocation is called a [risk parity portfolio](https://en.wikipedia.org/wiki/Risk_parity).
There are different ways to calculate these weightings, but here's one.
Decide on a maximum acceptable volatility for the whole portfolio.
12% is probably reasonable.
That's close to the volatility of `SPY`.
Don't Bet the Farm. I would not go over 20%.
Remember we don't know where the Kelly size is.
Leveraging too much will actually reduce returns.

Then your target dollar exposure for an asset is
$bankroll\frac {maxVol}{Vol}$
Vol is inversely proportional to target weight.
More vol, less exposure. Less vol, more exposure.
In practice, this formula will tend to undershoot your max vol,
since you get the diversification benefits of these assets,
their net vol will be less than the sum of their vols.
There are other ways of computing the weightings that account for this effect.

If the total exposure is less than your bankroll,
you will be leveraging down by keeping some cash in reserve.
If the total exposure exceeds your bankroll,
you will have to use more leverage to hit your target allocations.
These ETFs are already leveraged 2x,
but there are some 3x ETFs available that you might use instead.
`TMF` for the bonds, and `UPRO` for the S&P.

## Diversify Even More. And Then Diversify Again.

There are only so many uncorrelated exchange-traded asset classes to choose from.
To really diversify, you'll have to get creative.
Consider more exotic investments like cryptocurrency,
prediction markets, and peer-to-peer lending.

But eventually, you'll run out of asset classes.
To diversify more, you have to diversify your _strategies_.

There will be more (and more advanced) strategies later in the sequence.
An active strategy can have a very different payoff distribution than the underlying assets it trades.
You can think of a trading system like another uncorrelated asset class.
Similar to the way you can allocate a risk parity portfolio of _assets_,
you can also create a portfolio of _strategies_ weighted by risk.

## Remember

You will _lose_ the game, even if it's completely fair, by oversizing your bets.

"Don't Bet the Farm" means you don't put all your nest egg in one asset class,
you don't leverage too high (but do leverage enough),
and you must diversify as much as you can manage,
not just among asset classes, but among strategies.

[The Third Law is up next.](https://www.lesswrong.com/posts/pb6ZREpbBXyojqDT4/how-to-pick-the-wrong-side)