I made a very small modification to allow %daily changes, rather than price values.
stock.dailychange<-100*(diff(stock.data$Adj.Close,lag=1)/y[1:length(stock.data$Adj.Close)-1])
calendarHeat(stock.data$Date[1:length(stock.data$Date)-1], stock.dailychange, varname="SPY daily % changes(CL-CL)")
Fig 1. Calendar Heat Map for SPY time series 2005-Present
What's interesting is you can see how unusual events tend to Cluster (heteroscedasticity) , and a preponderance of low change days (as would be expected in close to Gaussian distributions). Using the regions of clustering might help warn of impeding catastrophic regimes (as seen in late 08), similar to using VIX as a proxy. In addition, the 10,000 foot bird's eye view, might allow you to spot pockets of order for further evaluation.
The things I really like about R is the ease of getting, wrangling, modeling and charting financial time series data ;-)
ReplyDeleteDefinitely,
ReplyDeleteAnd there are plenty of great packages available for trading, such as QuantMod.
In addition to time series plotting, there are a wealth of fantastic statistics tools as well.
Yes, Quantmod + IBrokers = getting, wrangling, modeling, charting and trading ;-)
ReplyDelete