This is a study of the relationship between the Stock Market and Interest Rates. We review how the Stock Market has reacted when interest rates rise. We also factor the influence of other macroeconomics variables.
The relationship between the Stock Market and Interest Rates
1. Will the Stock Market crash with the
upcoming rise in interest rates?
A study of the relationship between interest rates and
the stock market
Gaetan Lion, February 19, 2022
1
2. Both the Federal Reserve and the
Futures markets anticipate that the
Fed Funds rate may reach 1.50% or
higher during the first half of 2023.
2
3. 3
Source: H.15 for FF and MacroTrends for S&P 500.
Data ranges from 1954 Q3 to 2021 Q3
The relationship between Rates and the Stock Market appears weak
We looked at 4 quarter increase in Federal Funds (FF) vs. the change in the S&P 500 level over same period.
As shown above, the S&P 500 performance is not clearly differentiated vs. rise in FF.
* The S&P 500 change were calculated by adding 4 quarterly % changes. If I had used compounding, the mentioned changes would
have been immaterially higher.
4. 4
Different data segmentations and quantitative methods all confirmed the
relationship between interest rates and the Market is weak
1) Models such as OLS and VAR did not work well (adjusted R Squares were very low.
They only confirmed the weakness of the relationship between rates and stock market.
This was true even when including other macroeconomic variables;
2) Disaggregating FF rates into “Up” and “Down” directions. The relevant correlations
with the S&P 500 were even weaker than otherwise;
3) Using lagged variables and forward variables. Again, the relevant correlations
weakened.
6. 6
Macroeconomic variables relationship (correlation) with S&P 500
Source: H15, Z1 Federal Reserve, BEA, MacroTrends
Data from 1954 Q4 to 2021 Q3
Each variable is fully detrended either as quarterly % change for
nominal variables or as First Difference in % for rate like variables.
Glossary:
ff. Federal Funds rate
t10. 10 Year Treasury
rgdp. Real GDP growth
CPI. Consumer Price Index
qe. Quantitative Easing. It represents the quarterly first
difference in the ratio of the Federal Reserve securities
holdings divided by GDP.
fiscal. This stands for fiscal policy. It is captured by the
quarterly first difference in the ratio of total Treasury
securities outstanding divided by GDP.
None of the interest rates, macroeconomics,
monetary policy or fiscal policy variables have high
enough correlations to explain much about the
change in S&P 500 level. The correlations are low.
The resulting R Squares are close to Zero.
7. An OLS Regression model
7
All the variables are stat. significant at
the alpha p-value < = 0.10 level.
A 1 percentage point change in 10
Year Treasury has more than twice the
impact on the S&P 500 vs. the same
change in FF.
Notice that overall this is a weak model with
an adjusted R Square of only 0.19. Yet, it
includes 5 of the 6 main independent
variables we considered.
When factoring FF much higher volatility than 10 Year Treasury, their respective impact on the S&P 500 converges
significantly (similar standardized coefficient or “Std. Beta”).
8. 8
All models fit the historical data rather poorly confirming the weak relationships
between rates (and other macroeconomics variables) and the S&P 500
Leveraging the variable selection
of the OLS model, we built Vector
Autoregression (VAR) models with
1 lag and 3 lags (selected as best
lags using information criteria).
As shown all three models do not fit the historical S&P 500 data. Just using a Naïve model taking the average S&P
500 quarterly % change as the one single estimate and accepting this variable standard deviation as the standard
error of such a model residuals… gives you nearly as much info as using the three mentioned models (OLS, VAR 1,
VAR 3).
9. 9
The OLS Regression (Step 5) shows a lot
more sensitivity to macroeconomic
variables. See how the Estimates in
green are a lot more sensitive (volatile)
within the top graph vs. the bottom
graph disclosing the VAR 1 model.
In both cases, the majority of the S&P
500 quarterly % change remains
unexplained as the Residuals (red) are
far larger and more sensitive to the
historical data than the model
estimates (green).
We don’t show the graph for the VAR 3
model because it is visually nearly
identical to the VAR 1 model.
10. Impulse Response Function Conundrum
10
Impulse Response Functions (IRFs) represent the response of a dependent variable to an unanticipated
shock in a specific independent variable (the impulse variable) over several periods.
But, as we will see the IRFs generated by the R software appear flawed. The ones generated by Python
are consistent.
11. Using R, it is difficult to interpret the IRFs
11
It is impossible to make any connection between the IRF graph and the coefficients of the FF variable with the 3
different lags. The IRF shows a S&P 500 response to a 1 percentage point unexpected shock in FF that is a lot
closer to Zero over the first 3 quarterly periods of the IRF graph than what the actual VAR regression coefficients
of the three FF lagged variables suggest.
12. Depending on how you order the variables within the VAR model and
IRF function, the IRF graph changes directional sign
12
Here the IRF denotes a negative impact
of a FF rate shock on the S & P 500.
Here the IRF denotes a negative impact
of a FF rate shock on the S & P 500.
The actual VAR model and the related FF coefficients do not change regardless of the order of the
variables; But, the IRFs do change as shown above.
13. With Python you get
consistent IRF graphs
13
Regardless of how you order your impulse variables
within the VAR model or the IRF, the IRF graphs will be
consistent and readily interpretable.
The first, second, and third quarterly periods of the IRF
show the exact same impact as the cumulative change
derived from the VAR regression coefficients.
Notice that the IRF shows the S&P 500 having a
positive response to a FF shock. This contradicts
investment theory and monetary policy. This is no
fault of Python. It reflects the weak relationship
between the variables leading to spurious VAR models.
The OLS regression did not run into that issue.
0.04 0.31
0.74
14. Python IRFs with 10 Year Treasury as impulse variable
14
- 0.87
- 1.20
- 1.40
Here the third period of the IRF shows a
value around – 0.80 that does not perfectly
match the – 1.20 cumulative change derived
from the VAR regression coefficients.
Mathematically, the two are not expected to
be identical. But, it is reassuring to observe a
convergence between the two. When using
R, you don’t get that.
16. 16
Scatter Plot Matrix Python
R
The R matrix adds correlation coefficients. The Python one
includes the Confidence Interval of the location of the
regression line data points.
17. Scatter Plot
17
R
Python
The coding challenge is relatively similar. Both
software are relatively competitive when
generating such scatter plots.
The scatter plots confirm the weak relationship between FF and the S&P 500. The slope of the regression line is
pretty flat. The width of the 95% Confidence Interval associated with the location of the mean data point on the
regression line is unusually wide.
18. 18
The scatter plots confirm the very weak relationship between the S&P 500
and FF or 10 Year Treasury
Both scatter plots show you that rates don’t impart much info to any model
fitting the S&P 500. The two scatter plots are not far from randomness. Earlier,
we had observed weak correlations between the rate variables and the S&P
500. The scatter plots give you a visual representations of such weak
correlations.
19. Scatter Plot Themes with R ggplotthemes()
19
The Economist Wall Street Journal
Business Week
R offers numerous excellent graph theme templates within its ggplotthemes() library. The template to replicate The
Economist format is, in my mind, the most successful. With a single line of code, you generate a very polished plot-
theme. Python does not have such capabilities. I have seen one set of codes to attempt to replicate The Economist
format, it appears to have more than 15 lines of codes and the result was not nearly as good as in R.
20. Scatter Plot Themes with R ggthemes() continued
20
Five Thirty Eight
Google Docs Solarized2 ~ Financial Times
The trade off when using these templates is that you can’t readily customize them. What you see is what you get.
22. Scatter Plot Themes with R ggplotthemes() continued
22
Get Foundation Excel New
I believe the “Foundation” theme template in the middle is the only one that is catered to facilitate further
customization.
23. Customized vs. template themes with R
23
Coding for the theme component:
Coding for the theme component:
The theme template saves a ton of coding
24. Facet grid plot. Customized vs. The Economist template
24
Again, The Economist
theme template
generates a pretty cool
graph theme in just one
word of coding.
25. 25
Histogram. R vs. Python
R Python
It is a lot easier to add a Kernel Density Function curve and a Normal distribution fit with Python than it is
with R. I am sure you can do it with R, but it takes a lot more efforts.
26. Histogram in R. Customized vs. The Economist template
26
Again, The Economist theme template
generates a pretty cool graph-theme in just
one word of coding. But, you loose ability
to customize any graph attributes.
The customized approach is burdensome.
But, you have control on the size of the fonts
for the titles. And, whether you want to
bold such titles. You also have control on
the color of the bars and background.
Note that the size of the OLS regression residuals (step 5) are rather huge. If we did a histogram of the S&P
500 quarterly % change, it would look fairly similar, indicating that the model offers little information.