Computing Tangency-Portfolio Weights with a Risk-Free Asset
Summary
The document presents an attempt to calculate the tangency portfolio for five risky Dow stocks and a risk-free asset using weekly simple returns over ten years. It supplies estimated asset returns, a covariance matrix, and its inverse, then applies a relation between portfolio weights, covariance, expected returns, and the risk-free rate. The resulting weights are checked against the portfolio’s calculated mean and standard deviation.
The author finds that the result appears inferior to the global minimum-variance portfolio and asks what went wrong. No response or corrected calculation is included, so the example does not establish a solution. It is useful for framing a mean-variance optimization question, but the return and risk inputs must be expressed on a consistent time scale, and the risk-free rate’s period and weight normalization matter when computing the tangency portfolio.
Key ideas
- The tangency portfolio is posed as a mean-variance optimization problem involving risky assets and a risk-free asset.
- The example provides estimated returns, a covariance matrix, and its inverse for five stocks.
- The author’s computed portfolio appears to have lower return and higher risk than the global minimum-variance portfolio.
- The document contains no answer, so it does not resolve the calculation or verify the reported weights.
Tags
Full text
# Calculating weights of tangency portfolio
# Calculating weights of tangency portfolio
Im having trouble calculating the market portfolio weights (tangency portfolio) for a portfolio consisting of 5 risky assets and 1 risk free asset with 2% return. The data is from 5 assets from the DOW index, weekly (simple) returns over 10 years.
```
mu_vector
[1] 0.0047814980 0.0006305876 0.0019639934 0.0022272630 0.0017666784
cov_matrix
[,1] [,2] [,3] [,4] [,5]
[1,] 0.0013136428 0.0004440908 0.0006384975 0.0002187552 0.0002699354
[2,] 0.0004440908 0.0006261272 0.0004859392 0.0002176951 0.0002377565
[3,] 0.0006384975 0.0004859392 0.0015624367 0.0002051366 0.0002193841
[4,] 0.0002187552 0.0002176951 0.0002051366 0.0004290360 0.0002074602
[5,] 0.0002699354 0.0002377565 0.0002193841 0.0002074602 0.0004136037
C_inv
[,1] [,2] [,3] [,4] [,5]
[1,] 1113.71762 -447.8322 -265.282719 -72.39333 -292.403774
[2,] -447.83220 2795.3090 -503.732477 -584.45180 -754.238655
[3,] -265.28272 -503.7325 910.756998 -45.87658 2.627825
[4,] -72.39333 -584.4518 -45.876579 3286.18313 -1240.774361
[5,] -292.40377 -754.2387 2.627825 -1240.77436 3663.144774
```
Now im using the property that all portfolios on the efficient frontier satisfy that $\gamma\cdot \vec{w_{tan}} \cdot C=\vec{mu}-RF\cdot \vec{1}$
given that RF=0.02
$\gamma \cdot \vec{w_{tan}} = (3.127893, -14.10325, -1.864773, -22.53139, -25.72763)$
since the weights must sum to 1 I get that $\gamma = -61.09915$
I get that $\vec{w_{tan}} = (-0.05119373, 0.2308257, 0.03052044, 0.3687677, 0.42108)$
using the formula for expected return on the portfolio : $\mu_v = \vec{mu} \cdot \vec{w^T_{tan}}=0.001525971$
and $std= \sqrt{\vec{w_{tan}} \cdot C \cdot \vec{w^T_{tan}}} = 0.01712042$ This return is smaller than the global min variance portfolio's return, and with higher risk, and is thus not on the efficient frontier. What have I done wrong? Any help is appreciated. If I need to provide the data ill do that!Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.