Intermediate Portfolio Analysis in R
Ross Bennett
Instructor
Portfolio optimization problem inputs:
Assets
Constraints
Objectives
Moments of asset returns
First Moment: expected returns vector
Second Moment: variance-covariance matrix
Third Moment: coskewness matrix
Fourth Moment: cokurtosis matrix
Moments to estimate are determined by objectives and constraints:
Mean - Variance
Expected returns vector
Covariance matrix
Minimum Variance
Ledoit and Wolf (2003): "The central message of this paper is that nobody should be using the sample covariance matrix for the purpose of portfolio optimization."
Methods:
Sample
Shrinkage estimators
Factor model
Expressing views
Robust statistics
20 Asset Portfolio:
Method | Sample | k = 3 factors |
---|---|---|
# of parameters | 210 | 86 |
set.portfolio.moments(R,
portfolio,
method = c("sample", "boudt", "black_litterman", "meucci"),
...)
set.portfolio.moments()
supports several methods:
Sample
Boudt
Black-Litterman
Meucci
# Sample vs Boudt
sample_moments <- set.portfolio.moments(R = asset_returns,
portfolio = port_spec)
boudt_moments <- set.portfolio.moments(R = asset_returns,
portfolio = port_spec,
method = "boudt",
k = 1)
round(sample_moments$sigma, 6)
[,1] [,2] [,3] ...
[1,] 0.000402 -0.000034 0.000262 ...
[2,] -0.000034 0.000632 -0.000037 ...
[3,] 0.000262 -0.000037 0.000337 ...
[4,] 0.000429 -0.000010 0.000568 ...
round(boudt_moments$sigma, 6)
[,1] [,2] [,3] ...
[1,] 0.000403 -0.000016 0.000224 ...
[2,] -0.000016 0.000636 -0.000019 ...
[3,] 0.000224 -0.000019 0.000337 ...
[4,] 0.000523 -0.000044 0.000614 ...
Intermediate Portfolio Analysis in R