Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Simple System US Markets back to 1870

Back to 1870

Data courtesy of Robert Shiller of Yale University, the Federal Reserve and NBER. Links to the data are on my website in the article.

22 responses

Anthony,

The “binary” system invests in a single series: the top performer each month out of the three possible investments. The 50/50 system invests in the top two out of the three equally weighted at the beginning of the month.

What are three possible investments?

US 10 year Bond Index, US Treasuries Index, S&P 500 Total Return Index

Anthony,

Which one is performing better in last 13 years?

1 Binary, 12 month
2 Binary, 1 month
3 50/50, 12 month
4 50/50, 1 month

For now I replicated 3 assets, re-balanced monthly, equally weighted using IEF, TLT, SPY as approximation of possible investments.

Binary, 1 month
CAGR 9.66
Max DD -16%

Binary 12 month
CAGR 9.41%
Max DD -11.63%

50/50 1 month
CAGR 6.22%
Max DD -6.39%

50/50 12 month
CAGR 6.21%
MaxDD -5.61%

On the data I used from the sources I quoted, binary looks very nice over the past 13 years. By comparison it does not look "quite" so nice over a few hundred. I'm afraid each year, each decade will produce its own twists and turns. I have no doubt whatsoever that daily data using the ETFs you quote will provide different results.

We are all shooting in the dark to a large extent. Science/maths/statistics don't currently allow us to forecast chaotic systems like markets or weather.

Simply monthly equal weighting between the three asset streams I am using produces the following since 1/1/2003:

CAGR: 4.69%
Max DD: -16.98%

Again, yours may well differ.

Simple monthly equal weighting of the three assets over the entire period since 1870 produces the following:
CAGR: 6%
Max DD: -37%
Vol (monthly annualised): 4.71%

You have made the wrong asset choice. You want one ten year bond fund, one 3 month treasury fund or money market fund. You have chosen two long term bond funds.

Or at least that is what you need if you want to try and match, even roughly, what I have done.

binary looks very nice over the past 13 years
Here how it looks in Q2 backtest.
Binary 1 year return.

Binary 1 month return

50/50 1 year return

50/50 1 month return

Anthony,

Have you ever tried something in between 1-12month ?
4 month return for example.
It looks solid in the past.

Which one do you like more ?

IEF is 7 TO 10 year treasury bond fun. Fine to use that. But then you want in addition a 3 month T Bill fund or money market fund. Not TLT. Or use SHY - at least it is only 1 to 3 year. Yes, I have tried everything from 1 to 12 months. As ever, some will work better in some periods than others.

I can not comment on the Q code but something is not quite right since you have some big spikes in leverage.

In general from the very long terms tests I have run my assumption is that I would be happy to trade such a scheme. A mixture of several different systems, some binary some 50/50, some using 1 month, some 3 or 6 or 9 or 12.

And using different indices: perhaps the ETF for MSCI EMEA, MSCI world, MSCE EM etc.

I'm going to start running a bit of money with this method and reporting the results on my website.

My forecast is that the method is probably reasonably robust and will outperform a market cap weighted stock index in at least relative terms with a lower draw-down and lower volatility.

But what do I know?

Using daily data, a 50/50 system, a 12 month lookback and the ETFs SHY, SPY and IEF I get:
CAGR 6.71
Max DD 9.33
Monthly vol (annualised) 4.97

Period: 2002-07-30 to date.

Unexciting perhaps but soundly beats SPY on a standalone basis adjusted for risk and drawdown.

"I'm going to start running a bit of money with this method and reporting the results on my website.

My forecast is that the method is probably reasonably robust and will outperform a market cap weighted stock index in at least relative terms with a lower draw-down and lower volatility."

Anthony, please note the large bull run in bonds in recent years - they are bound to implode sooner or later. If you start running money NOW as opposed to a few years back, you will inevitably have to deal with mean reversion in bonds, stocks or both. Adding other stuff like gold, corn, oil, etc. might be necessary....but who am I to know the future.

please note the large bull run in bonds in recent years

That's a very large part of the reason to run tests through bull and bear markets both for bonds and equities over hundreds of years. The vast majority of a bond fund's performance comes from coupon not price. A constant maturity index dampens volatility and drawdown but still has something to say about periods of rising interest rates: the fall in price is compensated for to some degree by the rise in coupon. And even more so in shorter maturities where the effect of a rise in interest rates has less effect on price.

But yes, who knows how anything will behave in the future. Damned if I know.

But back to commodities and metals - again, interesting to look at very long term price trends, over hundreds of years. But more of that anon.

Deep History Commodity Prices

These should provide some clue as to where to run in bad times! But there again, probably not. Probably no uptrend in commodity prices over the very long term?

This one looks rather fun.

Or this.

Unfortunately, in geological time (which need not perhaps worry us!) EVERYTHING is mean reverting.

50-50-252 SHY, IEF, SPY

something is not quite right since you have some big spikes in leverage
That is proabably came from Quantopian "realistic" slippage model .
They disappeared when I disabled it.

Wow! Now that IS a beautiful chart! I would be happy to achieve an equity curve so smooth.

I wonder if you could get the gains of those spy bubbles by being aggressive towards short term performance and falling back to the 252 choice at the first sign of trouble.