Application of Horizon Plots

July 31, 2012
By

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

for background please see prior posts Horizon Plot Already Available and Cubism Horizon Charts in R

Good visualization simplifies, and stories are better told with effective and pretty visualizations.

Although horizon plots are not immediately intuitive, I have embraced them as an extremely effective method of analyzing more than four series.  I hope they become much more popular, so I can use them with much more confidence.  If we look at a traditional cumulative growth chart on the managers dataset provided by PerformanceAnalytics, I get confused by too many lines and colors since there are 10 different series.  While this chart works, it can be better.

From TimelyPortfolio

We could panel the data, but I think this makes comparison even more difficult.

From TimelyPortfolio

In this case and many others, horizon plots provide what I feel to be both a more attractive and effective visualization.  Here is an example using latticeExtra’s horizonplot function with very little adjustment.  You can detect both comovement or seasonality and can compare the amplitude simultaneously.

From TimelyPortfolio

With a little additional formatting, we can get an ideal visualization-pretty and effective.  The ability to scale well beyond 10 series offers power that we cannot obtain with a traditional line chart.

From TimelyPortfolio

As another example, let’s look at how we can use horizon plots to monitor a moving average system similar to the Mebane Faber's timing model.  If you follow the link, you can see a decent visualization of the price and moving average.  A horizon plot could accomplish this much more efficiently.

From TimelyPortfolio

I personally like the mirrored horizon plot even better.  Let’s incorporate that.

From TimelyPortfolio

Please help me popularize these extremely powerful charts.

R code from GIST (do raw for copy/paste):

To leave a comment for the author, please follow the link and comment on his blog: Timely Portfolio.

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...



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

Tags: , , ,

Comments are closed.