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

June 5, 2014

by Georg Vrba

Advisor Perspectives welcomes guest contributions. The views presented here do not necessarily represent those of Advisor Perspectives.

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:

  • it is simple, rational, and rule based,
  • has very few variables (only four moving averages),
  • has sufficient sample size with adequate supporting data (1950–2014),
  • and 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 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.

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.

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 signaled 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

Click to View
Click for a larger image

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

Click to View
Click for a larger image

Out-of-sample performance

The MAC-system was originally published on Jul-31-2012. Since Dec-30-2011 it has signaled 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.


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

Georg Vrba


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, yield curve, gold, silver and recession prediction, all published in Advisor Perspectives. The models are updated weekly at

Website by the Boston Web Company