Whether you’re trying to maximize Sharpe ratio or information ratio, building a risk parity portfolio, or inferring an investor’s expected returns her given portfolio weights, the key component to each goal is contribution to portfolio risk.
The Modern Portfolio Theory formula for variance of a portfolio with n assets is:
i=1,n j=1,n wi wj ijij (1)
You can assign portfolio variance to the different segments of the portfolio by breaking this formula down further. It turns out that just as portfolio return is the weighted sum of the asset returns, portfolio variance is the weighted sum of the asset covariances with the portfolio. So first let’s identify how to calculate asset covariance.
The covariance of asset i with the portfolio is:
i j=1,n wj ijj (2)
Its contribution to portfolio risk is its weighted covariance:
wii j=1,n wj ijj (3)
If you add up all n assets’ weighted covariances (3), you get the formula for portfolio variance (1).
If you understand this bit of portfolio math well enough to estimate contribution to portfolio risk, you can solve any kind of tractable MPT portfolio problem, whether you’re finding portfolio weights on the efficient frontier or reverse optimizing portfolio weights to tell you the investor’s expected returns.