Visualizing Asset Performance with Horizon Plots in Base Graphics

Finance Published: August 05, 2012
BACGOOGL

The Hidden Power of Horizon Plots in Base Graphics

Horizon plots are a powerful visualization tool used by investors and analysts to track the performance of various assets over time. In this article, we'll explore how to create horizon plots using base graphics, a fundamental skill for any financial professional.

By leveraging the capabilities of R, we can build comprehensive visualizations that help identify trends, patterns, and correlations in data. Horizon plots are an essential component of this analysis, providing a clear representation of performance and risk.

The Mechanics of Horizon Plots

At its core, a horizon plot is a graphical representation of asset returns over time, with each bar or line segment representing the return for a specific period. By using base graphics in R, we can create dynamic and customizable visualizations that cater to individual needs and preferences.

One key feature of horizon plots is their ability to highlight areas of significant change or volatility. This makes them an invaluable tool for identifying potential risks and opportunities in the market.

Building Horizon Plots with Base Graphics

To build a horizon plot using base graphics, we can leverage R's `polygon` function to create a series of connected bars or lines that represent each asset's return over time. By adjusting parameters such as color, transparency, and line width, we can customize the appearance of our visualization to suit our needs.

Let's consider an example using data from the managers package in R:

require(RColorBrewer) require(quantmod) require(PerformanceAnalytics)

data(managers) x <- cumprod(1+managers["2002::2004"])[,1] - 1

plot(index(x), coredata(x), type="n", bty="n", las=1, yaxt="n", xlab=NA, ylab=NA, y # thanks http://stackoverflow.com/questions/9630014/polygon-for-xts-objects polygon( index(x)[c(1,1:n,n)], c(0,ifelse(coredata(x) > 0,coredata(x), 0),0), col=col.brew[7] )

Portfolio Implications: A Closer Look

When it comes to portfolio construction and management, horizon plots can provide valuable insights into the performance of individual assets and the overall portfolio. By analyzing these visualizations, investors can identify areas where their portfolio may be vulnerable to risk or opportunities for growth.

Let's consider a hypothetical example using data from C (Citigroup), GS (Goldman Sachs), BAC (Bank of America), and GOOGL (Alphabet Inc.):