We can also model the portfolio’s variance as a function of factors. The portfolio’s variance can be broken up into two parts, the risk contribution of the factors, and the specific risk that is not due to the factors. Note that is similar to what we saw earlier with the factor model of returns. The end goal is to become familiar with this formula, which models portfolio variance in terms of common factors. These variables represent matrices. The point of these matrix multiplications is to add up the individual stock variances and pairwise covariances, to get the variance of the entire portfolio. Also, to remember the various pieces and to make the math easier to digest, I’ll use ice cream as an analogy to describe the variables. Here’s the covariance matrix of factors, we can think of this as the main ingredients for making the ice cream, such as milk and sugar. Here is the matrix of factor exposures, as well as its transpose, which we can think of as measuring spoons for the ingredients. Here’s the matrix of specific variances, also known as idiosyncratic variances. Which we can think of as ingredients that are specific to each ice cream, such as pecans or chocolate chips. Finally, there is the matrix of portfolio weights, and its transpose. We can think of these as ice cream scoops, which help us choose how much of each flavor of ice cream to put in our bowl.