Analyzing optimization results

Intermediate Portfolio Analysis in R

Ross Bennett

Instructor

Workflow: analyze results

Visualization Data Extraction
plot() extractObjectiveMeasures()
chart.Concentration() extractStats()
chart.EfficientFrontier() extractWeights()
chart.RiskReward() print()
chart.RiskBudget() summary()
chart.Weights()
Intermediate Portfolio Analysis in R

Example: extract weights

# Extract the optimal weights
extractWeights(opt)
Convertible Arbitrage   CTA Global      Distressed Securities    
         0.000000e+00   6.515184e-02         5.840055e-18                     

Emerging Markets     Equity Market Neutral      Event Driven
  -8.501425e-18           9.348482e-01          4.105887e-18
Intermediate Portfolio Analysis in R

Example: extract weights

head(extractWeights(opt_rebal), n = 3)

         Convertible Arbitrage   CTA Global   Distressed Securities
2001-12-31          0.12986589   0.06849445            0.00000000
2002-12-31          0.08738164   0.08645814            0.00000000
2003-12-31          0.09177469   0.03192720            0.02419038?
           Emerging Markets  Equity Market Neutral  Event Driven
2001-12-31     7.113112e-18             0.8016397  -1.608927e-16
2002-12-31    -2.553006e-19             0.8261602  -3.837233e-17
2003-12-31     0.000000e+00             0.8521077   2.991493e-19
Intermediate Portfolio Analysis in R

Example: extract weights

# Extract the optimal weights
extractWeights(opt)
Convertible Arbitrage   CTA Global      Distressed Securities    
         0.000000e+00   6.515184e-02         5.840055e-18                     

Emerging Markets     Equity Market Neutral      Event Driven
  -8.501425e-18           9.348482e-01          4.105887e-18 
Intermediate Portfolio Analysis in R

Example: extract weights

head(extractWeights(opt_rebal), n = 3)
           Convertible Arbitrage CTA Global 
         Convertible Arbitrage   CTA Global   Distressed Securities
2001-12-31          0.12986589   0.06849445            0.00000000
2002-12-31          0.08738164   0.08645814            0.00000000
2003-12-31          0.09177469   0.03192720            0.02419038?
           Emerging Markets  Equity Market Neutral  Event Driven
2001-12-31     7.113112e-18             0.8016397  -1.608927e-16
2002-12-31    -2.553006e-19             0.8261602  -3.837233e-17
2003-12-31     0.000000e+00             0.8521077   2.991493e-19
Intermediate Portfolio Analysis in R

Example: chart weights

# Chart the weights
chart.Weights(opt)
chart.Weights(opt_rebal)

Chart weights plot

Intermediate Portfolio Analysis in R

Example: chart weights

# Chart the weights
chart.Weights(opt)
chart.Weights(opt_rebal)

Rebalancing period plot

Intermediate Portfolio Analysis in R
# Extract the objective measures
extractObjectiveMeasures(opt)
$StdDev
     StdDev 
0.008855401
head(extractObjectiveMeasures(opt_rebal))
                StdDev
2001-12-31 0.006521328
2002-12-31 0.005886103
2003-12-31 0.005656744
2004-12-31 0.005855993
2005-12-31 0.004308911
2006-12-31 0.004198900
Intermediate Portfolio Analysis in R

Example: optimization analysis

# Compute the rebalancing returns
rr <- Return.portfolio(ret, weights = extractWeights(opt_rebal))
charts.PerformanceSummary(rr)

Performance summary plot

Intermediate Portfolio Analysis in R

Let's practice!

Intermediate Portfolio Analysis in R

Preparing Video For Download...