Combining the different features of thequantmodpackage (as describedhere), one can come up with a time-series based heatmap of some financial indices, like the S&P 500 for example. Below is an adaptation of Hans Gilde’s ideas to the S&P 500 since 2007. Note that some symbols were removed...
First things first, we need to create a web page that’ll hold our super-cool heatmap. We start by making a basic HTML page, complete with adivelement to hold our chart. Let’s also specify the style of thedivto make it stretch over the whole page. Don’t worry, it’s easy-peas...