Back to Community
Response to Investify's Myth Buster article

Saw this a little while ago: http://blog.investify.com/2014/07/myth-busters-buy-and-hold-strategy/

Thought I would test it out. With the brief test of using SPY over the past 10 years, the returns look about the same, but with less risk, so perhaps it isn't a bad alternative to hold and buy.

Clone Algorithm
13
Loading...
Backtest from to with initial capital
Total Returns
--
Alpha
--
Beta
--
Sharpe
--
Sortino
--
Max Drawdown
--
Benchmark Returns
--
Volatility
--
Returns 1 Month 3 Month 6 Month 12 Month
Alpha 1 Month 3 Month 6 Month 12 Month
Beta 1 Month 3 Month 6 Month 12 Month
Sharpe 1 Month 3 Month 6 Month 12 Month
Sortino 1 Month 3 Month 6 Month 12 Month
Volatility 1 Month 3 Month 6 Month 12 Month
Max Drawdown 1 Month 3 Month 6 Month 12 Month
# Backtest ID: 53b46e67c52c2c07070cfb2d
There was a runtime error.
5 responses

hey Nader! Thanks for building that.

I simplified it slightly by using the order_target_value method. Completely the same logic, saves you some manual calculations.

Clone Algorithm
7
Loading...
Backtest from to with initial capital
Total Returns
--
Alpha
--
Beta
--
Sharpe
--
Sortino
--
Max Drawdown
--
Benchmark Returns
--
Volatility
--
Returns 1 Month 3 Month 6 Month 12 Month
Alpha 1 Month 3 Month 6 Month 12 Month
Beta 1 Month 3 Month 6 Month 12 Month
Sharpe 1 Month 3 Month 6 Month 12 Month
Sortino 1 Month 3 Month 6 Month 12 Month
Volatility 1 Month 3 Month 6 Month 12 Month
Max Drawdown 1 Month 3 Month 6 Month 12 Month
# Backtest ID: 53b4788d203d100737b6c2a9
There was a runtime error.
Disclaimer

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by Quantopian. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. No information contained herein should be regarded as a suggestion to engage in or refrain from any investment-related course of action as none of Quantopian nor any of its affiliates is undertaking to provide investment advice, act as an adviser to any plan or entity subject to the Employee Retirement Income Security Act of 1974, as amended, individual retirement account or individual retirement annuity, or give advice in a fiduciary capacity with respect to the materials presented herein. If you are an individual retirement or other investor, contact your financial advisor or other fiduciary unrelated to Quantopian about whether any given investment idea, strategy, product or service described herein may be appropriate for your circumstances. All investments involve risk, including loss of principal. Quantopian makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances.

Nice, simple, and so easy.

Nader and Jean, here's a further refinement - your version of the algo was actually sitting on a lot of cash. When you got the "go long" signal, you were buying the amount of cash you had in 2002. But, by 2012, you had already built up quite a bit of returns, so you were only putting some of your money back into the market. That's why the S&P 500 was gaining on you - it's all-in, and you were holding back.

This version puts 100% of your money into the market when the buy signal is triggered. A further refinement would be to re-invest the dividends, but that won't have as big of an impact.

Clone Algorithm
27
Loading...
Backtest from to with initial capital
Total Returns
--
Alpha
--
Beta
--
Sharpe
--
Sortino
--
Max Drawdown
--
Benchmark Returns
--
Volatility
--
Returns 1 Month 3 Month 6 Month 12 Month
Alpha 1 Month 3 Month 6 Month 12 Month
Beta 1 Month 3 Month 6 Month 12 Month
Sharpe 1 Month 3 Month 6 Month 12 Month
Sortino 1 Month 3 Month 6 Month 12 Month
Volatility 1 Month 3 Month 6 Month 12 Month
Max Drawdown 1 Month 3 Month 6 Month 12 Month
# Backtest ID: 53b55a72fa7ad30761ebfa5d
There was a runtime error.
Disclaimer

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by Quantopian. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. No information contained herein should be regarded as a suggestion to engage in or refrain from any investment-related course of action as none of Quantopian nor any of its affiliates is undertaking to provide investment advice, act as an adviser to any plan or entity subject to the Employee Retirement Income Security Act of 1974, as amended, individual retirement account or individual retirement annuity, or give advice in a fiduciary capacity with respect to the materials presented herein. If you are an individual retirement or other investor, contact your financial advisor or other fiduciary unrelated to Quantopian about whether any given investment idea, strategy, product or service described herein may be appropriate for your circumstances. All investments involve risk, including loss of principal. Quantopian makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances.

Maybe I am being overly skeptical, but I get very concerned about market timing signals which (coincidentally or not) happen to go all cash before the second half of 2008, and otherwise track or lag the market return. Is there supporting evidence which suggests that the signals used here will avoid the next significant crash? Or are we picking them because they happen to have avoided one crash?

Notice that, for example, the most recent algorithm here also went to cash after significant corrections in 2010 and 2011, and stayed in cash while the market rebounded. That suggests to me that perhaps it caught the 2008 crash purely by chance. Unless you are claiming that the SMA signal in early 2008 was somehow predictive of the excesses of the mortgage-backed securities market.

Here's what it does from mid-2009 onwards.

Clone Algorithm
4
Loading...
Backtest from to with initial capital
Total Returns
--
Alpha
--
Beta
--
Sharpe
--
Sortino
--
Max Drawdown
--
Benchmark Returns
--
Volatility
--
Returns 1 Month 3 Month 6 Month 12 Month
Alpha 1 Month 3 Month 6 Month 12 Month
Beta 1 Month 3 Month 6 Month 12 Month
Sharpe 1 Month 3 Month 6 Month 12 Month
Sortino 1 Month 3 Month 6 Month 12 Month
Volatility 1 Month 3 Month 6 Month 12 Month
Max Drawdown 1 Month 3 Month 6 Month 12 Month
# Backtest ID: 53b58584049c34071e7316cd
There was a runtime error.

Nader, thanks for taking initiative to build out the algorithm. Dan, thanks for fixing the algo to go all in - all out. Just for fun I cloned the algo and tried to add a piece that would buy SDS ( S&P short ETF) when the 200 when above the 50, so you make money on the way down... but my hacky coding skills kept breaking the algo.

Anyway, I wrote a quick follow up blog to the original if you're interested. http://blog.investify.com/2014/07/follow-up-to-myth-busters-buy-and-hold/