Get startedGet started for free

Analyze results and compare to benchmark

In the previous exercises of the chapter, we created an equal weight benchmark r_benchmark and ran the following optimizations:

  • Minimize portfolio standard deviation with sample estimates (returns stored in returns_base).
  • Minimize portfolio standard deviation with percentage contribution to risk using sample estimates (returns stored in returns_rb).
  • Minimize portfolio standard deviation with percentage contribution to risk using robust estimates (returns stored in returns_rb_robust).

Now we wish to analyze the performance of the optimization backtests and compare with the benchmark.

This exercise is part of the course

Intermediate Portfolio Analysis in R

View Course

Exercise instructions

  • Combine the returns of the benchmark portfolio and optimizations into a single xts object.
  • Compute and display the annualized returns.
  • Chart the cumulative return and drawdowns.

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

# Combine the returns
ret <- cbind(___, ___, ___, ___)

# Compute annualized returns
table.AnnualizedReturns(R = ___)

# Chart the performance summary
charts.PerformanceSummary(R = ___)
Edit and Run Code