(This article was first published on Intelligent Trading, and kindly contributed to R-bloggers)
Today's financial headlines are littered with the word 'plunge.' Considering today's (cl-cl) drop on the S&P500 was just about -5%, I don't know that I would exactly call that a plunge.Fig 1. Historical ts plot of S&P500 returns <= -5%
The following R code produced a time series plot of historical occasions where this occurred.
###################################################library(quantmod)
getSymbols("^GSPC",from="1950-01-01",to="2012-01-01")
adj<-GSPC$GSPC.Adjusted
rtn<-(adj/lag(adj,1)-1)[2:length(adj)]
r05<-rtn[rtn<= -.05]
plot(sort(r05),type='o',main='S&P500 1950-present returns <= -5%')
###################################################Although the frequency of such occurrences is arguably rare, the 1987 drop is much more worthy of the 1 day label 'plunge.'
One other disturbing observation in the data, however, is the large temporal clustering of occurrences in the recent 2008 region. Now that's behavior to be concerned about (not to mention revised flash crash data pts.).
filtered 1 day cl-cl returns <=-5% sorted by date
To leave a comment for the author, please follow the link and comment on his blog: Intelligent Trading.
R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...



Zero Inflated Models and Generalized Linear Mixed Models with R.
Zuur, Saveliev, Ieno (2012).