Quant Investment — how I construct FACTORS for alpha research (feature engineering)

Eric Chen, CFA, FRM
5 min readMay 31, 2024
Photo by ThisisEngineering on Unsplash

For any aspiring Quantitative Researchers, whether your goal is to be on the sell side or buy side, the hardest part before applying any model is always where to get started and how to put various sources of data together. I’ve faced similar challenges, and still do from time to time but it goes to more granular level like the most fit-for-purpose way of imputing data that may improve the accuracy even just slightly better than the previous version.

So I’m putting together this article with the goal of getting you started. I’ll teach you how to construct:

  • lagged return and momentum factors
  • Fama factors
  • discretionary factors like sector, industry

These are certainly not enough factors to generate alphas, but with the same mindset and methodology you’ll be able to engineer your own features.

Step 1: Getting raw data

I’m using a few of my favorite names as an example and get the daily ticker px through yahoo finance package.

import pandas as pd
import numpy as np
# import the core package
import yfinance as yf

# set the time period of which you want to retrieve the ticker data
PeriodStart = "2000-01-01"
PeriodEnd = "2024-05-24"…

--

--