MV Implementation - Short
MV Implementation - Short
Vincent Milhau
vincent.milhau@edhec.edu
1 / 49
The Estimation Problem
▶ The tangency portfolio depends on the covariance matrix and
the expected excess returns:
𝚺−1 𝛍̃
𝐰tan =
𝟏′ 𝚺−1 𝛍̃
𝚺̂ −1 𝛍̂̃
𝐰̂ tan =
𝟏′ 𝚺̂ −1 𝛍̂̃
2 / 49
Outline
3 / 49
Mean-Variance Optimization Versus Equal Weighting
▶ Reference paper: DeMiguel, Garlappi and Uppal (2009). “Optimal
Versus Naive Diversification: How Inefficient is the 1/𝑁 Portfolio
Strategy?” Review of Financial Studies.
▶ The tangency portfolio is estimated with the sample covariance
matrix and the sample average returns.
▶ The portfolio is rebalanced every month based on parameters
estimated from the past 120 months of data.
4 / 49
Mean-Variance Optimization Versus Equal Weighting
(Con’t)
▶ Excerpt from Table 3 of DeMiguel et al. (2009):
▶ The equally weighted portfolio has higher Sharpe ratio than the
mean-variance efficient portfolio in 5 out of 6 investment
universes!
▶ “mv (in sample)” is the tangency portfolio estimated with the
full sample of returns (unrealistic!)
▶ Equal weighting (“naive diversification”) performs often much
better than mean-variance (“scientific diversification”)...
5 / 49
How to Improve Mean-Variance Efficient Portfolios?
▶ Conclusion: Estimation errors penalize severely mean-variance
efficient portfolios.
▶ Approach 1: Improve inputs (expected return and covariance
estimates):
▶ Why do sample estimates perform poorly?
▶ Search for better parameter estimates.
6 / 49
Outline
7 / 49
Outline
8 / 49
Sample Mean
▶ A natural estimate of the expected return 𝜇𝑖 is the sample mean
of past returns.
Definition
The sample mean of returns for asset 𝑖 is
𝑇
1
𝜇̂ 𝑖 = 𝑟𝑖̄ = ∑𝑟
𝑇 𝑡=1 𝑡,𝑖
9 / 49
The Sample Mean is Unbiased
Property
Assume that, for all date 𝑡,
𝔼 [𝑟𝑡,𝑖 ] = 𝜇𝑖
10 / 49
Confidence Interval for the Expected Return
Property
Assume that the returns
𝜎̂ 𝑖 𝜎̂ 𝑖
ℓb𝑖 = 𝜇̂ 𝑖 − 1.96 , ub𝑖 = 𝜇̂ 𝑖 + 1.96
√𝑇 √𝑇
𝑟ann = [1 + 𝑟]12 − 1
12 / 49
Annualized Returns with Confidence Bounds
13 / 49
Estimating Expected Returns in Practice
▶ Approach 1: postulate some risk - expected return relationship.
▶ Scientific Beta Efficient Maximum Sharpe Ratio Indices assume
that expected excess returns are proportional to semivolatilities;
▶ TOBAM’s Maximum Diversification Approach assumes that
expected excess returns are proportional to volatilities (see
foundation paper by Choueifaty and Coignard (2008). “Towards
Maximum Diversification”. Journal of Portfolio Management);
▶ Use a multifactor model, where expected returns are functions of
betas (but this may still lead to unrealistic estimates).
▶ Approach 2 (beyond the scope of this course): incorporate prior
views about expected returns.
▶ The Black-Litterman model (Black and Litterman (1992), “Global
Portfolio Optimization”. Financial Analysts Journal) mixes investor’s
views with expected returns inferred from the market portfolio.
▶ See workbook Black-Litterman.xlsx.
14 / 49
Outline
15 / 49
Sample Covariance
▶ Reminder: the covariance between the returns on two assets 𝑖
and 𝑗 is
ℂov[𝑟𝑖 , 𝑟𝑗 ] = 𝔼 [[𝑟𝑖 − 𝜇𝑖 ] [𝑟𝑗 − 𝜇𝑗 ]]
Definition
Consider two assets 𝑖 and 𝑗. The sample covariance is
𝑇
1
𝜎̂ 𝑖𝑗 = ∑ [𝑟 − 𝑟 ̄ ] [𝑟 − 𝑟 ̄ ]
𝑇 𝑡=1 𝑡,𝑖 𝑖 𝑡,𝑗 𝑗
16 / 49
Bias of Sample Covariance
Property
Consider two assets 𝑖 and 𝑗. If, for any two dates 𝑠 and 𝑡,
𝑇 −1
𝔼 [𝜎̂ 𝑖𝑗 ] = 𝜎𝑖𝑗
𝑇
▶ An unbiased estimator is
𝑇
𝑇 1
𝜎̂ 𝑖𝑗 = ∑ [𝑟 − 𝑟 ̄ ] [𝑟 − 𝑟 ̄ ]
𝑇 −1 𝑇 − 1 𝑡=1 𝑡,𝑖 𝑖 𝑡,𝑗 𝑗
17 / 49
Sample Covariance in Excel
▶ See workbook Covariance_matrix.xlsx.
18 / 49
Confidence Interval for the True Covariance
Property
Consider two assets 𝑖 and 𝑗, and assume that the pairs of returns
𝜋̂ 𝑖𝑗 𝜋̂ 𝑖𝑗
ℓb𝑖𝑗 = 𝜎̂ 𝑖𝑗 − 1.96√ , ub𝑖𝑗 = 𝜎̂ 𝑖𝑗 + 1.96√
𝑇 𝑇
𝑇 2
1
𝜋̂ 𝑖𝑗 = ∑ [[𝑟 − 𝑟 ̄ ] [𝑟 − 𝑟 ̄ ] − 𝜎̂ 𝑖𝑗 ]
𝑇 𝑡=1 𝑡,𝑖 𝑖 𝑡,𝑗 𝑗
19 / 49
Impact of Sampling Frequency on Precision
▶ In the Python notebook estimation.ipynb, we calculate the
“precision”, defined as the absolute sample covariance divided
by the bandwidth of the confidence interval:
|𝜎̂ 𝑖𝑗 |
ub𝑖𝑗 − ℓb𝑖𝑗
20 / 49
Empirical Application
▶ Distribution of precision figures across the 10 × 11/2 = 55
covariances for 10 stocks:
Precision of sample covariance
4.0
3.5
3.0
2.5
2.0
1.5
1.0
0.5
Monthly Weekly Daily
21 / 49
How Many Covariances Do We Have to Estimate?
Property
For a 𝑁-asset investment universe, the total number of covariances
and variances to estimate is
𝑁[𝑁 + 1]
2
22 / 49
The Curse of Dimensionality
▶ The number of covariances increases faster than the number of
assets.
Number of assets Number of covariances
𝑁 𝑁[𝑁 + 1]/2
5 15
50 1,275
500 125,250
2,000 20,010,000
23 / 49
Which Estimation Errors Matter More? Expected
Returns or Covariances?
▶ Kan and Zhou (2007). “Optimal Portfolio Choice with Parameter
Uncertainty”. Journal of Financial and Quantitative Analysis.
▶ 𝑁 = universe size .
▶ 𝑇 = sample size .
▶
Estimation errors in expected returns
have in general more impact
than errors in covariances .
▶ But errors in covariances
have a growing impact as
𝑁/𝑇 increases.
24 / 49
Summary
▶ The estimated tangency portfolio is affected by estimation
errors.
▶ Although they are unbiased, sample average returns are very
inaccurate estimates of the true expected returns.
▶ The sample covariance matrix is subject to the curse of
dimensionality as 𝑁/𝑇 is large.
25 / 49
Outline
26 / 49
Structured Estimator 1: The Single Index Model
▶ Sharpe (1963). “A Simplified Model For Portfolio Analysis”.
Management Science.
▶ Assume that returns are generated by the one-factor model:
𝑟𝑡,𝑖 = 𝑐𝑖 + 𝛽𝑖 𝐹𝑡 + 𝜀𝑡,𝑖
27 / 49
Covariance Matrix Decomposition
▶ In the single factor index model, the covariance matrix of
returns can be decomposed as
𝚺 = 𝜎𝐹2 𝛃𝛃′ + 𝚺𝜀
where
2
𝜎𝜀,1 0 ⋯ 0
𝛽1 2
0 𝜎𝜀,2 ⋯ 0
𝛃 = [⋯], 𝚺𝜀 = [ ]
⋯
𝛽𝑁 2
0 0 ⋯ 𝜎𝜀,𝑁
𝚺 = 𝛃𝛀𝛃′ + 𝚺𝜀
30 / 49
Bias versus Robustness Tradeoff
▶ Structured estimators are more parsimonious than the sample
one:
Number of independent parameters to estimate
Universe size Sample covariance Single index Constant
matrix model correlation
𝑁 𝑁[𝑁 + 1]/2 2𝑁 + 1 𝑁+1
5 15 11 6
50 1,275 101 51
500 125,250 1,001 501
2,000 20,010,000 4,001 2,001
hence they tend to be more robust, i.e., less sensitive to the
choice of the sample.
▶ However, they are biased if the assumption about the structure
of returns is wrong, while the sample estimator is unbiased.
▶ Next level (beyond the scope of this course): get the best of
both worlds by combining the sample estimator with a
structured one.
▶ This is called linear shrinkage.
▶ Ledoit and Wolf (2003). “Improved estimation of the covariance
matrix of stock returns with an application to portfolio selection”. 31 / 49
Comparing Estimators
▶ A comparative study: Coqueret and Milhau (2014). “Estimating
Covariance Matrices for Portfolio Optimization”. Scientific Beta
White Paper.
▶ Methodology:
1. Estimate the covariance matrix over the 𝑇 past weeks and get an
estimate 𝚺;̂
2. Calculate the global minimum variance portfolio and hold it for 3
months:
𝚺̂ −1 𝟏
𝐰gmv = ;
𝟏′ 𝚺̂ −1 𝟏
3. Re-estimate the covariance matrix and loop through steps 1 and 2
until the sample end;
4. Report the volatility of the GMV strategy.
▶ The lower the OOS volatility, the better the estimation method.
32 / 49
Investment Universes
▶ Several investment universes are considered to check
robustness of the findings and analyze the impact of the
universe size (𝑁) .
▶ Definition of universes in CM14:
33 / 49
How Do the Structured Estimators Perform? (Con’t)
▶ Excerpt of Table 6 in CM14 (volatilities of estimated GMV
portfolios):
35 / 49
Short Positions in Mean-Variance Efficient Portfolios
▶ See the workbook Weight_constraints.xlsx, where the tangency
portfolio is
345.0% A
−341.1% B
𝐰tan = [ 125.2% ] C
114.1% D
−143.2% E
𝜇𝑝 (𝐰) − 𝑅𝑓
max subject to 𝐰 ′ 𝟏 = 1 and 𝐰 ≥ 𝟎
𝐰 𝜎𝑝 (𝐰)
36 / 49
Tangency Portfolio Under Long-Only Constraints
▶ Tick the box “Make Unconstrained Variables Nonnegative” in the
Solver to remove short positions.
Implementation Exercise
37 / 49
Effect of Long-Only Constraints on the Tangency
Portfolio
▶ Jagannathan and Ma (2003). “Risk Reduction in Large Portfolios:
Why Imposing the Wrong Constraints Helps”. Journal of Finance.
▶ In large universes (e.g., 500 stocks), long-only constraints
improve the out-of-sample Sharpe ratio for all covariance
matrix estimators. Excerpt from Table VIII in JM03:
40 / 49
Alternative Diversification Methods
▶ See the Benchmark Builder of Scientific Beta:
▶ Tangency portfolio * ;
▶
Global minimum variance
;
(GMV) portfolio
▶
Equally weighted portfolio,
or portfolio that minimizes
;
the dispersion of weights
across constituents
▶
GMV portfolio assuming
;
equal volatilities
𝜇𝑝 (𝐰) − 𝑅𝑓
𝜎𝑝 (𝐰)
42 / 49
Another Diversification Method: Risk Parity
▶ Maillard, Roncalli and Teiletche (2010). “The Properties of
Equally Weighted Risk Contribution Portfolios”. Journal of
Portfolio Management.
▶ Motivation: An equally weighted portfolio of stocks and bonds is
perfectly diversified in terms of dollars, but most of the variance
comes from stocks, which are much more volatile than bonds.
2 2
𝜎𝑝2 = 𝑤1 [𝑤1 𝜎1 + 𝑤2 𝜎12 ] + 𝑤2 [𝑤2 𝜎2 + 𝑤1 𝜎12 ]
⏟⏟⏟⏟⏟⏟⏟⏟⏟ ⏟⏟⏟⏟⏟⏟⏟⏟⏟
𝑐1 𝑐2
𝑐1 = 𝑐2
𝑤1 + 𝑤2 = 1
Definition
The risk parity portfolio is such that all constituents have the same
contribution to the portfolio variance.
45 / 49
Risk Parity with 2 Assets (Con’t)
▶ It can be shown (left as an exercise) that the risk parity portfolio
of 2 assets is the inverse volatility portfolio
1 1
𝑤1 = 𝑧 × , 𝑤2 = 𝑧 ×
𝜎1 𝜎2
with
−1
1 1
𝑧=[ + ]
𝜎1 𝜎2
▶ Exercise: calculate the stock and bond weights in the risk parity
portfolio if the stock volatility is 𝜎1 = 20% and the bond
volatility is 𝜎2 = 5%.
46 / 49
Risk Parity with 3 Assets
▶ Portfolio variance with 3 assets:
𝜎𝑝2 = 𝑤12 𝜎12 + 𝑤22 𝜎22 + 𝑤32 𝜎32 + 2𝑤1 𝑤2 𝜎12 + 2𝑤1 𝑤3 𝜎13 + 2𝑤2 𝑤3 𝜎23
▶ Re-arrange terms to have contributions of assets 1, 2 and 3:
2
𝜎𝑝2 = 𝑤1 [𝑤1 𝜎1 + 𝑤2 𝜎12 + 𝑤3 𝜎13 ]
⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟
𝑐1
2
+ 𝑤2 [𝑤2 𝜎2 + 𝑤1 𝜎12 + 𝑤3 𝜎23 ]
⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟
𝑐2
2
+ 𝑤3 [𝑤3 𝜎3 + 𝑤1 𝜎13 + 𝑤2 𝜎23 ]
⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟⏟
𝑐3
48 / 49
Summary and Perspectives (Con’t)
▶ Possible remedies (con’t):
▶ Impose long-only constraints.
▶ Next level: impose norm constraints to have more diversified
portfolios (DeMiguel, Garlappi, Nogales and Uppal (2009). “A
Generalized Approach to Portfolio Optimization: Improving
Performance by Constraining Portfolio Norms”. Management Science).
▶ Deviate from Sharpe ratio maximization (GMV, equally weighted,
risk parity...)
▶ Proxy the tangency portfolio as a combination of
factor-replicating portfolios.
49 / 49