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.