Abstract: This article explores some of the economic indicators available on FRED and their potential relationships with the SPX index. A primary aim is to establish if these indicators possess predictive, coincidental, or lagging power relative to the stock market. A selected basket of 35 indicators, satisfying a criteria such as simplicity of interpretation and independence from market trading, is tested against SPX returns using linear regression. The results, visualized through scatter plots, show that the results cannot be explained by linear regression..
As traders, portfolio managers or investors, we all have wet dreams about having a dashboard where we just plug in some numbers, and get a market state! Next years’ forecast: Inflationary Boom. Buy stocks! stock on commodities! Leverage! Some us of tried making such systems or tools. We might have discovered that there is many things to choose from- so many indicators! Imagine if I just create a spreadsheet with all of them. I will be rich!
Today I will be digging into the economic indicators that our beloved FRED has to offer and trying to figure out if they have any predictive, coincidal or maybe just lagging power, when compared to the SPX index. To be honest, they have quite a bit of metrics under their belt. Fortunately for us, their data is widely available and they even have an API! We will make a use for it.
FRED boasts having thousands of indicators, so which ones to choose from? The criteria I establish is the following:
- Indicator is easy to interpret. Like Unemployment: Low is good, High is bad. Simple!
- Linear relationship: We are looking for potentials with at least some linear relationship (like unemployment)
- Indicator should not be dependent on market, it should not trade (ex: no yields, spreads)
- Indicator should be popular and widely accepted
After fishing for a while, I came up with a basket of some indicators. 35, to be exact. Note, that they are presented in python dictionary format, where key is the name and the second value is the ticker. See the values below:
- “Unemployment”: “UNRATE”,
- “Labor Force Participation”: “CIVPART”,
- “Nonfarm Employment”: “PAYEMS”,
- “Industrial Production”: “INDPRO”,
- “Retail Sales”: “RETAIL”,
- “Personal Savings”: “PSAVERT”,
- “Personal Consumption)”: “PCEPILFE”,
- “Personal Income”: “DSPIC96”,
- “Business Inventories”: “BUSINV”,
- “Housing Starts”: “HOUST”,
- “Trade Balance”: “NETEXP”,
- “Corporate Profits”: “CP”,
- “M2 Money Stock”: “M2”,
- “Total Public Debt”: “GFDEBTN”,
- “Capacity Utilization”: “TCU”,
- “Durable Goods Orders”: “DGORDER”,
- “Hourly Earnings”: “CES0500000003”,
- “Claims for Unemployment”: “ICNSA”,
- “Personal Consumption”: “PCECC96”,
- “Domestic Investment”: “GPDI”,
- “Consumer Sentiment”: “UMCSENT”,
- “Labor Productivity”: “PRS85006092”,
- “Consumer Credit”: “TOTALSL”,
- “Delinquency on Mortgages”: “DRSFRMACBS”,
- “Commercial Loans”: “BUSLOANS”,
- “Delinquency on Commercial Loans”: “DRBLACBS”,
- “Capacity Utilization”: “CAPUTLG211S”,
- “Total Vehicle Sales”: “TOTALSA”,
- “BAA on 10-Year”: “BAA10Y”,
- “Homeownership Rate”: “RHORUSQ156N”,
- “Delinquency on Credit Cards”: “DRCCLACBS”,
- “Commercial Paper”: “COMPOUT”,
- “Profits After Tax”: “CPATAX”,
- “Consumer Credit”: “TCMDO”,
- “Construction Spending”: “TTLCONS”
Now that’s juicy! Goal now is to put them on a scatter plot where Y is the SPX returns and X is the indicator change. We want to make a chart that looks like Fig. 1

Imagine we are talking about unemployment (again!). If unemployment rate would be x and SPX returns would be y, then we would expect the chart to follow some line which goes up when unemployment decreases.
Next step is to calculate the R Squared, which is a statistical measure of how well the line explains (or fits) the data, 1 being a perfect fit and 0 meaning that the line does not explain anything. 0.5 would mean that line explains about 50% of the points.
For the stock market, we want the line to explain more than 50% as it would be the same as guessing! We can safely say that the indicator explains the movement of the SPX if the benchmark is 0.6 and more. I think this is reasonable.
Next step is to get the data. For that, python has a library fredapi which is very simple to use. The problem? I can only access the quarterly data, however, this is fine as we will be comparing the relationship between indicator and SPX in all kinds of shifts and offsets, periods. So if the goal is to find a linear relationship between quarterly SPX change and quarterly indicator change, we should ideally check indicator value and compare it to SPX q/q, SPX semi-annual, SPX 9-month trailing, SPX annual; Also we want to see if indicator is forward, current or backwards looking, therefore we will shift the SPX returns by 8 positions – from -4 quarters (annual back to see if indicator matches SPX that is backwards looking) to +4 quarters (to see if indicator is forward looking). That means we will have to make 9 * 4 = 28 different calculations for 35 indicators. Draw charts + calculate R Squared. For each iteration, I will calculate the average R Squared value to see how well do all these indicators explain the market.
Once coding is done, we launch the program and we have a seemingly a never ending list of charts. See Fig. 2

Below we print out the values of R Squared to see how well the line fits the data. In the script provided, the amount of individual indicators is ridiculously big, so what we do is take an average fit for each iteration and thus, we see the prints. See Fig. 3

This essentially says that our bucket of fish is empty! The biggest values, meaning the most linear relationship between SPX change and Indicators are when SPX is not shifted (x = 0), meaning currently! Having said that, the linear relationship explains a maximum of 5% on average! That is a horrible result which cannot be trusted, yet many funds and market participants look into these metrics and base their trades on them!
Conclusion:
I am aware that different market conditions can yield different reactions to the released economic data, however, most of the indicators that I used in this article can be interpreted positively or negatively. Total Vehicle Sales growing? Good. Personal Savings falling? Bad.
Leave a Reply