A more accurate comparison of portfolios
Looking at the value and distribution of returns of your portfolio is a good start, but it doesn't necessarily tell the whole story. You could obviously look at many other charts and metrics, but ultimately what matters is performance, and specifically periods of poor performance.
The PerformanceAnalytics
package provides additional tools to get a finer view of your portfolio. In particular, the charts.PerformanceSummary()
function provides a quick and easy way to display the portfolio value, returns, and periods of poor performance, also known as drawdowns.
In this exercise, you will use this new function on the same old and new portfolio data in old.vs.new.portfolio
from the previous exercise.
This exercise is part of the course
Visualizing Time Series Data in R
Exercise instructions
- Draw the value, the return, and the drawdowns of the old portfolio.
- Draw the value, the return, and the drawdowns of the new portfolio.
- Subset the two return columns from
old.vs.new.portfolio
and chart them to view the performance of both portfolios on the same graph.
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# Draw value, return, drawdowns of old portfolio
# Draw value, return, drawdowns of new portfolio
# Draw both portfolios on same chart