Imagine we have price-volume data set and fundamental data set which gives us all the info we need (e.g,. OHLC, earnings, dividends etc.) for stocks listed in a market for long time period. I.e., you have all the essential data.

How can we calculate a factor model from scratch? We need to generate factor returns, factor exposures, and factor covariance matrix.

I have made research and found tons of articles which superficially explains what is factor investing and maybe explains a few factors but none explains how it is calculated from scratch.

The best resource I have found is as follows. It is quite good but certain aspects are still not clear.


I am hoping that some of you might know some documentation or open-source projects which shows how factors are calculated in detail.


  • 4
    $\begingroup$ Does this answer your question? How to build a factor model? $\endgroup$
    – Kevin
    Jun 27, 2021 at 16:41
  • $\begingroup$ @Kevin Thank you for pointing out that. Let me review and get back to you. $\endgroup$ Jun 27, 2021 at 19:57


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.