Constructing a factor from raw data
A factor is a rule that ranks securities. The rule is only as good as the data it consumes and the care taken in turning that data into a comparable score.
Choose the raw variable
Begin with an economic rationale for why the variable should matter, written down before any data is examined. A variable chosen after seeing the results is not a hypothesis; it is a description of the past.
Normalise across the universe
Raw variables are rarely comparable across companies. Earnings yield is comparable; earnings are not. Within the universe, convert the variable to a rank or a z-score so that a single extreme value cannot dominate the portfolio.
- Winsorise at the 1st and 99th percentiles before computing z-scores.
- Neutralise sector exposure if the factor is not intended to be a sector bet.
- Record the exact universe and date of every score so that the calculation can be reproduced later.
Test out of sample, once
Hold back a period of data that the construction process never touches. Test there once. If the result disappoints, the factor is discarded, not adjusted. Adjusting and retesting turns the holdout into part of the training set.
