Out of sample performance evaluation
This example will illustrate how your returns can change based on the weighting created by an optimized portfolio. You will use the estimation portfolio (pf_estim) to evaluate the performance of your portfolio on the estimation sample of returns (returns_eval).
How severe is the optimality loss? Let's compare, for the portfolio weights in pf_estim, the performance you expected using the evaluation sample (returns_estim) with the actual return on the out-of-sample period (returns_eval).
pf_estim, returns_estim, and returns_eval are pre-loaded in your workspace.
Diese Übung ist Teil des Kurses
Introduction to Portfolio Analysis in R
Anleitung zur Übung
- Calculate the returns of the portfolio with monthly rebalance weights
pf_estim$pwon the estimation samplereturns_estim. Call thisreturns_pf_estim. - Calculate the returns of the portfolio with monthly rebalance weights
pf_estim$pwon the evaluation samplereturns_eval. Call thisreturns_pf_eval. - Use the function
table.AnnualizedReturns()onreturns_pf_estim. - Use the function
table.AnnualizedReturns()onreturns_pf_eval. Compare the return, risk, and Sharpe ratio of these portfolios. The results from thepf_evalare what you may expect in a real performance.
Interaktive Übung
Vervollständige den Beispielcode, um diese Übung erfolgreich abzuschließen.
# Create returns_pf_estim
returns_pf_estim <- Return.portfolio(___, pf_estim$pw, rebalance_on = "months")
# Create returns_pf_eval
# Print a table for your estimation portfolio
# Print a table for your evaluation portfolio