Interest Rates’ Influence on 1987

February 21, 2011

(This article was first published on Timely Portfolio, and kindly contributed to R-bloggers)

One aspect of 1987 that does not deserve enough attention is interest rates.  Higher interest rates constrain economic activity and compete with other investments.  As seen in the chart below, the US 10year Treasury rate climbed 40% from 7% to 10% as the S&P made its 40% price run.  Particularly interesting is the last move higher in rates as stocks flattened August-October 1987.

From TimelyPortfolio

Just for fun on February 23 2010, as I was getting a little bearish, I put together this chart which turned out to be 2 months early.  I’ll show the original to avoid any hindsight bias.


US 10y rates through 4% this cycle will become burdensome to this nonstop up move in stocks.  So far, 10y rates have just recovered to a low normal due to Fed manipulation.  Remove the manipulation, and the rate would easily be through 4%, and stocks would struggle.

From TimelyPortfolio


r code (please offer suggestions):

#as reader MILK commented, I just add this require TTR for clarity
#both quantmod and ttr are from the very generous and gifted Josh Ulrich


end<- format(Sys.Date(),”%Y-%m-%d”) # yyyy-mm-dd

# Pull tckr index data from Yahoo! Finance
getSymbols(tckr, from=start, to=end)

#only way I know to remove the NAs from FRED 10 year rates


#running 25 day correlation

#need to add labels to TA added to the quantmod chart but do not see in docs
#named the xts series was the only way to get a decent label
#please let me know if there is a way to override the TA label
chartSeries(GSPC[“1987-01::1987-10-19″,],log=FALSE,theme=’white’,name=”S&P 500 with US 10 year Rates”,TA=”addTA(US10yRate);addTA(SP500divbyUS10yRate);addTA(correlationSPand10y)”)

chartSeries(last(GSPC,”100 days”),log=FALSE,theme=’white’,name=”S&P 500 with US 10 year Rates”,TA=”addTA(US10yRate);addTA(SP500divbyUS10yRate);addTA(correlationSPand10y)”)

To leave a comment for the author, please follow the link and comment on their blog: Timely Portfolio. offers daily e-mail updates about R news and tutorials on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...

If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...


Comments are closed.

Search R-bloggers


Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)