Member-only story
How to do factor investing
How to turn value and momentum into one score, select and weight 100 stocks, and rebalance them with trading costs, on simulated data.
Part 3 of 3 in a series on stock characteristics and factors: 1. What a straight line can miss about stock returns, 2. Testing a stock characteristic as a factor, 3. How to do factor investing.
Factor investing selects and weights stocks by fixed rules based on their characteristics. Value measures how cheap a stock is relative to its fundamentals, and momentum is its return over the past year; using several characteristics together is multifactor investing. Part 2 tested whether a characteristic is a factor. This post takes value and momentum as factors and uses them to build and maintain a portfolio on simulated data.
The portfolio is long-only: it owns stocks and never sells borrowed shares. A factor return in academic papers, such as HML, the value factor of Fama and French (1993), is the return of a long-short portfolio, which buys value stocks and sells borrowed shares of growth stocks.
Simulating the data
The simulated data is a daily panel, as a data vendor delivers it: one row per stock and trading day, with the date, ticker, total return, market cap, book equity and sector of 500 stocks from January 2004 to December 2025. Each day’s book equity is the latest published value, as it was known that day. The portfolio runs…








