Using Implied Volatility for Portfolio Optimization

LOL. I pitched to him the idea of shrinking the covar matrix
Decompose the covar matrix into a corr matrix and a vol vector. Discard the vol vector (or use it as an input to your own estimated vol vector) and replace it with your own IV-dominated estimated vol vector. Then shrink the corr matrix, estimated vol vector, and the mean vector separately. Shrink the estimated vol and mean vectors towards their global and sector/factor means. Shrink the mean vector by much more than you think you should. Then combine the shrunken corr matrix and shrunken estimated vol vector to get your estimated covar matrix. Fit tangency portfolio using the [now shrunken] estimated covar matrix and the very-shrunken mean vector.

If you've done it right, it will almost certainly beat the naive equal-weight 1/n portfolio and even the min-variance portfolio. The only red flag that I see is that using implied vol implies a short lookback period (max expiry in my options database is 20221216). MV-optimal portfolios using recent covar and means are usually mean-vector dominated and tend to resemble standard 12-minus-1 momentum portfolios, which could be disastrous if the market turns or rotates out of current leaders.
 
Check the world economy well, since managing your investment portfolio when an end of the economic cycle is coming can be a bad idea. I read that there are experts who recommend rebalancing the distribution of your assets, buying treasure bonds, focusing on raw materials, commodities or real estate investment, the really important thing is to learn how to manage risk.
 
You already have the tools for it. You took a Matlab (short for Matrix Laboratory) course. Once you've read in a CSV file of, say, FAANG historical returns, it is only a couple of lines of Matlab code to fit a mean/variance-optimal portfolio (of just those FAANG names) and obtain a vector (list of decimal numbers) of portfolio weights.

If I have time over the weekend I will code something up in Matlab illustrating the calculation of mv-optimal (tangency), minimum variance, and risk-parity (Dalio's All-Weather) portfolios, and post it here. Each portfolio is only a single short line of code. Take the code one line at a time and I am sure you will get it.
I failed the MATLAB course. :(

However, I am getting quite good at programming in VBA and am doing all my computations using VBA. Can I do it using VBA Excel?
 
However, I am getting quite good at programming in VBA and am doing all my computations using VBA. Can I do it using VBA Excel?
Sure, try translating the R code below into VBA for a simple way to calculate the tangency (max Sharpe) portfolio directly from your array of returns (each column is the returns of a single stock):

Code:
maxSharpePortfolio <- function(X)
{ ones <- rep(1,nrow(X))
  lmod <- lm(ones ~ -1 + X)
  retur(coef(lmod) / sum(coef(lmod)))
}
X is your matrix (or range or array) of stock returns or log returns
ones is a vector (or single dimensional array) or ones the same length as you X array has rows.
lm is the R version of excel's linest, which returns the the coefficints (your portfolio weights) directly. Note that the intercept for the regression has to be zero (third argument to linest).

Once you've got the code above translated and working, I'll post code for a direct fit of the minimum variance portfolio. Then the equal risk contribution portfolio.

Good luck with the translation.
 
Back
Top