A Quant Framework For The S&P 500

A Quant Framework For The S&P 500

For long-time subscribers, the current composite model reading is 0.90.

In a previous article, I outlined both the purpose and construction of my Simple Stock Model. Keep reading for a quick run-down if you’re new to the model; otherwise, you can skip down to “Technicals” for the updated data.

Investors are constantly exposed to sound bites and data points presented without any proper context. You might have read an article about how stocks have historically bounced when sentiment has reached a negative extreme. Or, that you should be out of the market if it’s trading below its 200-day moving average.

When I come across articles like that, I always think it was shortsighted to base an opinion on the S&P on only one indicator without also considering a wide variety of other inputs.

The goal of the model is to help you form a data-based outlook on the S&P. Additionally, at the end of this article, I showcase a composite model that incorporates all of the indicators I use, so your view can be comprehensive as opposed to having tunnel vision on only one indicator.

How the Model Works

Each article is broken down into four main sections: Technicals, Sentiment, Rates, and Macro. Each section includes a number of different indicators. For each indicator, there’s a “filter rule” for when to be out of the market. In the spirit of simplicity, the filter rule is always binary, dictating either 100% long exposure to the S&P or a 100% cash position. The S&P is represented by the SPDR S&P 500 Trust ETF (NYSEARCA:SPY). Let’s dive into an example graph. All graphs are from the Simple Stock Model website:

The above data is from Yahoo Finance. The graph shows the price momentum indicator within the technicals section. The bottom portion plots the momentum metric over time, and the top portion plots the historical performance of following the filter rule.

For each indicator, new data each weekend is used to generate a long SPY or cash position for the next week. For the above momentum example, SPY’s dividend-adjusted close as of Friday is the main input. Using this, I calculate the 12-month total return. For each indicator on this site (except for the macro data), I take a four-week average of the main indicator input.

So, for this example, I’m taking the four-week average of 12-month total return momentum. Why four weeks? To reduce false positives and whipsaws when an indicator is bouncing slightly above or below its filter rule. There’s nothing special about a four-week average. You could use two or eight weeks and reach similar results.

Data is compiled as of Friday’s close. Buying or selling decisions occur at Monday’s close. I do this, as opposed to making trades at Monday’s open, simply because I had a more reliable data source for dividend-adjusted close data. It’s also important to reflect realistic transaction costs. Each simulated historical performance graph factors in a $10 trade commission and a 0.02% spread on SPY for each buy or sell. Commissions and spreads are lower now, but considering SPY started in 1993, I chose to use these above-average numbers.

Now you understand the methodology behind the model. Each week, I’ll cover a handful of indicators, especially those that have changed positioning over the past week. Let’s get started with some technicals.


Margin debt increases as investors pledge securities to obtain loans from their brokerage firm. FINRA releases margin debt data on a monthly basis. It should be noted that I previously used data from NYSE, but it will soon hand over the reporting duty to FINRA.

It’s important to avoid looking at the nominal amount of margin debt outstanding. Any credit-based indicator will steadily grow over time as the economy expands. Instead, I like to look at the yearly percentage change in margin debt.

Historically, positive annual growth in margin debt has actually been a positive sign for future short-term S&P returns. Note how excessive margin debt growth was in 2000 and 2007. We’ve yet to see margin debt growth rates accelerate to those levels this cycle. Margin debt has grown by 21.4% over the past year. Data is from FINRA.

The classic trend-following approach is to have long exposure to the S&P if the index is above its 200-day moving average. That works, but you get whipsawed with a lot of false signals. That’s why I use a four-week average of SPY’s distance relative to its 200-day moving average. It’s a bit slower on catching big moves but signals fewer false positives. The S&P is currently above its 200-day moving average, meaning it’s in an uptrend.

Following this trend strategy would have kept you invested in the market since March 2016. The main benefit of long-only trend-following strategies is not in higher returns, but instead, through (hopefully) lower volatility. This trend metric took a dip last week but is still above my cut-off filter of 0%. Data is from Yahoo Finance.

We are outside of the buyback blackout period. Companies typically suspend share buybacks in the five-week period leading up to their scheduled earnings announcements. Since most of the earnings season is over, most buyback programs are active.

It’s important to note that this buyback blackout window is different for each company, and my period covers the five-week period before the majority of companies report earnings. As a percentage of total NYSE volume, corporate buybacks have increased over the past few years. Data is from Yahoo Finance.


The VIX futures curve is made up of prices of individual VIX futures contracts. When the curve is upward sloping from left to right, the curve is said to be in contango. Contango means that market participants expect implied volatility to be higher in the future. The VIX futures curve is typically in contango.

When the curve is downward sloping from left to right, it is said to be in backwardation. In this scenario, near-term VIX futures are more expensive than long-term futures, meaning that investors expect volatility in the short term to be very high.

VIX futures have been in the spotlight recently. This article is an important read on long-term drivers of volatility product performance.

The VIX futures curve is currently in backwardation. I should also note that the front part of the VSTOXX futures curve is also in slight backwardation. Data is from CBOE.

The Chicago Board Options Exchange reports three different put/call ratios: total, index, and equity. The total put/call ratio combines the latter two. I analyze the total put/call ratio, since it gives the most comprehensive view of options market sentiment. Historically, it’s worked out well to cut exposure to the S&P when the ratio is low and traders are complacent.

CBOE’s total put/call ratio has bounced a bit, meaning more investors are bidding up puts relative to calls. This indicator is above my “complacency” threshold of <0.90. Data is from CBOE.


The yield curve is a popular tool used to forecast the direction of the economy. People tend to talk about how a flat or inverted yield curve is bad for markets. I choose to analyze the movement of the curve rather than its static shape. Specifically, I look at how the difference between the 2-year Treasury yield (NYSEARCA:SHY) and the 10-year yield (NYSEARCA:IEF) has shifted over the past 12 months.

Historically, a rapidly steepening curve has actually been more detrimental for stocks than a flat or inverted curve. In a steepening curve, short-term rates fall faster than long-term rates. In the past, steepening yield curves have been associated with the Federal Reserve quickly lowering the Federal Funds rate during a recession. Given the low current level of short-term interest rates, there’s now less room for the curve to massively steepen, since short-term rates are still fairly low.

This 10-2 year portion of the yield curve has flattened by 56 basis points over the past 12 months. Over the past few months, though, the trend in the shape of the yield curve has started to change. Steepening has gained traction, in contrast to the flattening that happened throughout most of 2017. My cut-off filter is steepening (for this section of the curve) of more than 50 basis points over a 12-month period. Data is from the U.S. Treasury.

The TED spread is a measure of credit risk. The spread reflects the difference between two short-term interest rates: 3-month USD LIBOR (ULBR) and the 3-month U.S. Treasury (BIL) yield. LIBOR reflects the rate at which banks borrow from each other on an unsecured basis.

The perceived risk in the banking sector grows as the spread between LIBOR and T-bills increases. This is because LIBOR measures the interest rate for unsecured lending between banks, and the Treasury rates are risk-free. The current TED spread is low and is below my cut-off filter of 0.75%. Data is from the St. Louis Federal Reserve Economic Database.


The unemployment rate is the percentage of the total U.S. workforce that is unemployed and actively seeking employment during the previous month. It is a lagging economic indicator, but a persistently rising unemployment rate indicates a weak labor market and thus potentially weak consumer spending.

Since our economy is heavily dependent on consumer spending, a rising unemployment rate is typically negative for future economic growth. The current unemployment rate is 4.1%, below its 12-month average of 4.4%. If the unemployment rate were to even slightly rise, this indicator would trigger. Data is from the St. Louis Federal Reserve Economic Database.

Earnings growth for the S&P 500 is largely driven by sales growth and profit margin expansion. Additionally, share buybacks are a contributing factor in earnings per share growth as buybacks shrink the number of shares outstanding. People view EPS growth as a sign of the improving profitability of American companies.

My rule for EPS is as follows: If the 12-month change in S&P EPS is greater than 0%, be invested in SPY. S&P EPS has risen by 20.2% over the past 12 months. Data is from Standard & Poor’s.

There are a variety of indices that monitor housing (VNQ) prices, and I choose to use the 10-city index that Karl Case and Robert Shiller developed. The S&P/Case-Shiller 10-City Composite Home Price Index measures the change in value of residential real estate in 10 metropolitan areas of the U.S.

According to this metric, US housing prices have risen by 6.1% over the past twelve months. The rate of appreciation has rarely been this stable over the past few decades. Data is from Standard & Poor’s.

Composite Model

Think of each indicator as a building block that helps form an overall opinion. One study might say current sentiment has historically been bullish on stocks. Who cares? That’s just one data point in isolation. I’m interested in a bigger-picture view with more context. A picture that also factors in what’s going on with macro data, interest rates, etc. The composite model does just that.

Here’s how it works. Each indicator is given a score of 1 or 0, depending on its current reading relative to its filter rule. If S&P earnings are down over the past year, and the filter rule for that metric is to be out of the market if yearly earnings growth is below 0%, then that indicator gets a 0. The table below summarizes data from all the previous sections and assigns a 1 or 0 to each indicator based on its current reading.

All 21 indicators are averaged to form the composite score. If the composite score is greater than 0.6, the model is invested in SPY. Think of 0.6 as the overall filter rule for the composite model.

There’s nothing special about 0.6 – it results in being invested in SPY about 80% of the time. I could have used a higher filter rule like 0.75 to only be exposed to the S&P when more indicators are saying to be invested, but this results in less time exposed to the market, since it’s a “stricter” cut-off. The chart below plots each individual category average score and the overall composite score.

So let’s summarize everything. Technical data is extremely strong. The trend is up, margin debt hasn’t contracted over the past year, most buyback programs are active, and we’re within the historically positive pre-FOMC drift period.

Sentiment data is now more balanced. Spot VIX has risen, VIX futures are in backwardation, and CBOE’s total put/call ratio reveals a bit more worry in the markets. The AAII survey still reflects a lot of bullishness, while the more institutional NAAIM Exposure Index shows less optimism.

The US 10-2 Treasury yield curve has flattened over the past year, high yield spreads are very low but still slightly below their 12-month average, and the TED spread doesn’t indicate any credit stress.

US macro data is very strong. Housing prices, S&P EPS, real retail sales, and industrial production have all risen over the past year. The ISM PMI north of 50 indicates strength in the manufacturing sector, and the unemployment rate is low and below its 12-month average.

Overall, the composite model is still long. This is because the composite score is 0.90, above the cut-off filter of 0.60.

I update all of the individual indicators and the composite model each week, so be sure to “Follow” me to track future updates!

I hope this article can help you out in your own investing process. Do let me know if you have any questions, I’m happy to help out

Disclosure: I/we have no positions in any stocks mentioned, and no plans to initiate any positions within the next 72 hours.

I wrote this article myself, and it expresses my own opinions. I am not receiving compensation for it (other than from Seeking Alpha). I have no business relationship with any company whose stock is mentioned in this article.

Additional disclosure: The author does not make any representations or warranties as to the accuracy, timeliness, suitability, completeness, or relevance of any information prepared by any unaffiliated third party, whether linked in this article or incorporated herein. This article is provided for guidance and information purposes only. Investments involve risk are not guaranteed. This article is not intended to provide investment, tax, or legal advice. Performance shown for each indicator is of a simulated hypothetical model. Performance is simulated and hypothetical and was not realized in an actual investment account. Performance includes reinvestment of all dividends. All risks, losses and costs associated with investing, including total loss of principal, are your responsibility.