ABSTRACT

We start with the textbook equation for the standard deviation of a multi-asset portfolio.

Standard Deviation =

√√√√ n∑ t=1

(xi − x)2/n

where x is each monthly portfolio return, x-bar is the mean monthly portfolio return and n is the number of observations. For a multi-asset portfolio, that equation equates to the weight squared of each asset multiplied by that asset’s variance, plus the covariance of each asset pair times the weight of each asset in the pair. It is a bit tedious to write that by hand with R code so we will not cover it here,1 but we will walk through a matrix algebra code flow.