Now how do the big boys do this in the real world? They use @AxiomaInc or @MSCI_Inc (formerly called MSCI BARRA but I think they dropped the name) https://twitter.com/ONAN_OUS/status/1278722283519873024
The main thing is we want a closed-form way to calculate factor exposures and the returns of those factors. We first start by defining our factors and their metrics.
I'm going to use four: market factor (i.e. everything has a beta of 1 to the market, this is fairly standard), size (log of mktcap), P/E for value, and 12mo total return for momentum.
Let's assume there are only five stocks: AAPL, CMCSA, DIS, WM, and LEN (because it seems all I do is watch content on my phone via cable in a home and generate garbage).
First we gather the raw data using my handy Bloomberg (or pay Capital IQ or Worldscope or something). The 'factor exposures' are then calculated as the Z scores of these values - they are converted to # of standard deviations from the mean. This becomes our factor loading matrix
To calculate the factor exposure of a portfolio, you multiply the portfolio weighting vector times this factor loading matrix. Here is a hypothetical 130/30 portfolio with an overall factor loading of (1.0, 1.0, 0.7, 0.6)
How do we get factor returns? Suppose the stocks do their stonk thing and go up and down. We have 5 stocks 4 factors. We have an underdetermined system and have to use least squares to solve it (or something else, if you're Axioma and fancy). (Ft F)^1 Ft y
Excel tells me these are the factor returns: market 0.2%, size 1.7%, PE -1.7%, momentum 0.4%. So each stock returns can be represented as a linear combination of factor returns. The whole thing can nicely be represented in matrices (hence the bio)
How do we calculate risk in this model? We calculate a covariance matrix of the factor returns (because IRL there are 30,000 stocks and maybe 100 factors in a big boy model) and a variance vector of the residual returns.
These two tweets are 99% of learning the basics of quant equity. It's really just basic linear algebra, statistics, and regression. It's so easy. Anybody can figure it out. They should teach this in 8th grade.
You can follow @ONAN_OUS.
Tip: mention @twtextapp on a Twitter thread with the keyword “unroll” to get a link to it.

Latest Threads Unrolled:

By continuing to use the site, you are consenting to the use of cookies as explained in our Cookie Policy to improve your experience.