Backtesting the MAC-System – How Long is Long Enough?

Most of us entrust our savings to financial organizations in the belief that this will provide us with better investment results than we could have achieved ourselves. These companies advocate a buy-and-hold strategy of bond- and stock funds, charge fees, and usually perform poorly. A convenient way to improve on buy-and-hold and to do better than financial organizations is to periodically switch one’s investment from stocks to bonds and vice versa as indicated by the Moving Average Crossover MAC-system. The MAC-system (described in Beyond the Ultimate Death Cross) uses cross-overs of moving averages of the S&P 500 to determine investment periods for the stock- and bond market.

The key to this model was finding moving averages whose cross-overs have the highest probabilities of successfully signaling stock market gains or losses. I found these moving averages using likelihood ratios. The most profitable buy signals occur when the 34-day exponential moving average (EMA) of the S&P 500 becomes greater than 1.001 times the 200-day EMA. The best sell signals are generated when the 40-day simple moving average (MA) of the S&P 500 crosses below the 200-day MA.

The MAC-system has the attributes needed to make it a believable market timing model:

  1. it is simple, rational, and rule based,
  2. has very few variables (only four moving averages),
  3. has sufficient sample size with adequate supporting data (1950–2014), and
  4. it is testable.

The original study used daily data from Jan-4-1965 to Jul-6-2012. The study period has now been extended to almost 65 years, from Jan-3-1950 to May-22-2014.

Stock Market Data

Daily data for the S&P500 to determine the moving averages is from Yahoo!Finance. Dividend adjusted values of SPY, the ETF which tracks the S&P500, can be obtained from Jan-9-1993 onward. For the preceding time period to Jan-3-1950 a synthetic SPY was calculated using daily data of the S&P500 and monthly dividends from Robert Shiller’s S&P data series.

Bond Market Data

Values for IEF, the iShares 7-10 Year Treasury Bond ETF are available from July 2002 onward. From 1950 to 2002 the 10-year Treasury Note yield was used to determine bond values at start and end of bond market investment periods. Daily yield data is available from January 1962 and prior to that monthly values are from Shiller’s data series. For an example of calculating bond returns see the Appendix.

Backtest Results 1950-2014

The model generated 61 investment periods, 31 for stocks and 30 for bonds as listed in the Appendix. There were only 8 periods which produced negative returns ranging from -0.1% to -9%. For an investment made in the beginning of 1950 the return to May-22-2014 would have been 3.5 times more from the MAC-system than what buy-and-hold of SPY produced, $100 would have grown to $311,000.

annualized return (CAGR)
Buy&Hold S&P500 with dividends11.21%
MAC System (S&P500 with dividends + 10-yr bonds)13.39%
MAC-system absolute return is 3.49 times Buy&Hold

Backtest Results 1999-2014

The model generated 13 investment periods from November 1998 to May 2014. There was only one period producing a negative return (0.26%). The absolute return of an initial investment to May-22-2014 would have been 2.4 times bigger from the MAC-system than what one would have had from buy-and-hold of SPY.

annualized return (CAGR)
Buy&Hold S&P500 with dividends5.33%
MAC System (S&P500 with dividends + 10-yr bonds)11.32%
MAC-system absolute return is 2.36 times Buy&Hold

Backtest Results 1999-2014

Using a Web-Based Stock Trading Simulation Site

For this simulation the MAC-system was designed to either select IEF or TLT as the bond fund depending on which was higher ranked at the time when MAC signalled the beginning of a bond market investment period. Also the simulation results differ slightly from those of the spreadsheet calculation because the criteria were evaluated only at the end of each week and due to differences in the way exponential moving averages are calculated for the two analyses. However, returns are similar as one can see from Figure-1.

There were only 12 investment periods, all producing positive returns (Overall Winners 12/12, 100%). The simulation’s annualized return was 11.7% with a maximum draw-down of -17%. An initial investment of $20,000 made on Jan-2-1999 would have grown to $109,713 by May-22-2014, about 2.7 times what SPY buy-and-hold would have produced. Note, that the benchmark return shown in the figures below is for the S&P500, not for SPY.

Figure-1: MAC-system Jan-1999 to May-2014

Figure-1: MAC-system Jan-1999 to May-2014

Additional simulations with various starting and ending dates were performed. The MAC-system always avoided down-stock-market periods and followed the S&P500 during up-stock-market periods. For example, had one started the simulation at the beginning of the last recession the MAC-system would have avoided the 55% draw-down of the S&P500, as can be seen in Figure-2.

Figure-2: MAC-system Dec-2007 to May-2014

Figure-2: MAC-system Dec-2007 to May-2014

Out-of-Sample Performance

The MAC-system was originally published on Jul-31-2012. Since Dec-30-2011 it has signalled a continuous investment in the stock market (SPY) and is currently still invested in SPY. The out-of-sample performance from Jul-31-2012 to May-22-2014 of SPY adjusted for dividends was 42.8% for an annualized return of 21.8%.

For the same period, a combination of two of oldest variable annuity accounts of financial service organization TIAA-CREF, 60% CREF Stock and 40% CREF Bond returned 31.9% for an annualized return of 16.6%. The lesser performance of the usually recommended 60:40 stock-bond fund combination highlights the advantage of following the MAC market timing system.

Following the MAC-system

Past performance is no guarantee of future performance. However, this model has now been backtested over almost 65 years and has performed well. How much longer must one backtest? Surely 65 years is long enough.
Weekly updates of the system are available on our website every Friday and can be viewed at no cost the following Monday evening.

Appendix

10-year Treasury Note returns
This is an approximate calculation and abbreviations are as follows:
Yo = % yield at the beginning of the investment period
Ye = % yield at the end of the investment period
C = assumed coupon = (Yo + Ye)/2 * $100
Vo = Bond Value at the beginning of the investment period (Dollars)
Ve = Bond Value at the end of the investment period (Dollars)
FV = Future Value at bond redemption = $100
In = Income from coupons (Dollars)
L = Length of investment period (years)
Po = Period to maturity at the beginning of the investment period (years)
Pe = Period to maturity at the end of the investment period (years)
PV = Present Value, the excel formula for present value is: PV(Y,P,C,FV)

Example: Bond market investment period 12/14/07 – 8/3/09

L = 1.64 years
Yo = 4,23%
Ye = 3.64%
C = (4.23 + 3.64)/2 = $3.94
Vo = PV(Yo,Po,C,FV) = PV(0.0423,10,3.94,100) = $97.67
Ve = PV(Ye,Pe,C,FV) = PV(0.0364,(10-1.64),3.94,100) = $102.13
In = 1.64 * $3.94 = $6.46
Return = ($102.13 – $97.67 + $6.46) = $10.92
Pct Return = $10.92 / $97.67 = 11.18%

Over the same period IEF adjusted for dividends returned = 11.52%

Stock and Bond Market Investment Periods

MAC-1950-2014

 

— By Georg Vrba of iMarket Signals.

Georg Vrba is a professional engineer who has been a consulting engineer for many years. In his opinion, mathematical models provide better guidance to market direction than financial “experts.” He has developed financial models for the stock market, the bond market, the yield curve, gold, silver, and for the recession indicator COMP, all published in Advisor Perspectives. 

Related articles…The Improved MAC System

About the Author System Trader Success Contributor

Contributing authors are active participants in the financial markets and fully engrossed in technical or quantitative analysis. They desire to share their stories, insights and discovers on System Trader Success and hope to make you a better system trader. Contact us if you would like to be a contributing author and share your message with the world.

  • Marco says:

    I believe this to be one of your best posts… It can be very helpful also for financial advisors with clients money. Thanks for posting!
    https://nightlypatterns.wordpress.com

  • Robert says:

    “2.has very few variables (only four moving averages),”

    Four variables optimized is a curve-fitted system and its performance reflects hindsight. I stopped right there. Waiting for next article…

  • Chap, 12 out of 12 trades were winners. This is clearly a curve-fitted system.

    You say, surely 65 years is long enough! Not at the trade frequency you report. Your success is based on 12 trades! That is not a back-test, that is nonsense.

    You don’t need all these moving averages — just a simple policy of selling when the market fell below a 250-day moving average and buying when it rose above would have worked… historically. It is a fact of history that trends have been long enough and sharp enough to overcome the negative effect of reversals on this time scale. BUT IT IS A CONTINGENT FACT. Do you have a theory to explain why the market ought to have trends of exactly this type? No? Then I repeat: you are curve fitting.

  • Nasko says:

    I find this article extremely useful and believe that traders should really concentrate on the trading plan. Apart from that, it is essential that the master trader trades from a
    perspective of rationality and skill and not from an emotional perspective. To
    a certain degree, the master trader should be willing and able to learn how to
    act in a contrarian way to human nature. In other words, the master trader
    needs to know how to harness the power of consciousness. In a way, this is like
    inventing a new perspective, which can give you the ability to see the market
    in a different angle, while at the same time being able to take responsibility
    for your own deeds.

    I have found an article about successful trading extremely helpful and it is indeed what I am applying myself and have been successful in the past 8 years. http://colibritrader.com/the-master-trader-part-1/
    I hope it would be helpful and you can learn a few new bits from it!

  • anon says:

    Can you further elaborate on your likelihood ratios? How did you go about selecting your parameters?

    Just because you ran the system through years of data, it doesn’t mean its not overfit.

  • >