Concept Specification
quant2026-12-09

ML for Factor Investing (Book Series)

Nine-lesson video walkthrough of Coqueret & Guida's Machine Learning for Factor Investing: the 1,207-stock US equity dataset, classic factors and the replication crisis, preprocessing, ridge/lasso, trees, neural nets, validation, backtesting, interpretability, causality, and RL.

Overview

Guillaume Coqueret and Tony Guida's Machine Learning for Factor Investing: Python Version (CRC Press, 2023) applies modern machine learning to cross-sectional equity factor investing on one transparent US equity dataset. Its premise is modest: future stock returns depend on firm characteristics through an unknown, potentially nonlinear, time-varying relationship, and simple benchmarks plus honest validation matter more than algorithmic sophistication. Sophie's video series covers Chapters 1–17 in nine lessons (~95 minutes total).

Lesson Roadmap

#ChaptersFocus
1Ch 1–2, §3.1–3.2, Ch 17Dataset, ML portfolio workflow, "ML is no magic wand", portfolio sorts, classic factors, Fama-MacBeth, factor competition
2§3.3–3.5 + Ch 4Factors vs characteristics, factor momentum/timing/ESG, preprocessing: missing data, outliers, scaling, labelling, persistence
3Ch 5 + Ch 9Ridge, lasso, elastic net, sparse hedging for minimum-variance portfolios; Bayesian priors, MCMC, Bayesian regression, naive Bayes, BART
4Ch 6 + Ch 8Simple trees, random forests, AdaBoost, XGBoost (monotonicity, DART), BART, and SVMs
5Ch 7Neural networks: perceptron, MLP, universal approximation, back-prop, depth vs sample size, dropout, LSTMs/GRUs, autoencoders, GANs
6Ch 10Validating and tuning: regression/classification metrics, ROC/AUC, bias–variance trade-off, grid/random/Bayesian search, purged CV
7Ch 11–12Ensembles and portfolio backtesting: signals to weights, performance metrics, common errors, non-stationarity, backtest overfitting
8Ch 13–14Interpretability (surrogates, variable importance, PDP, LIME, Shapley), causality (Granger vs Pearl), covariate shift and concept drift
9Ch 15–16Unsupervised learning (PCA, autoencoders, k-means, kNN), reinforcement learning (Q-learning, policy gradients), series wrap-up

Lesson 1: Foundation (Ch 1–2, §3.1–3.2, Ch 17)

  • Shared dataset. 1,207 US-listed stocks sampled monthly (283,380 full rows Nov 1998–Mar 2019; 268,336 filtered 2000–2018 rows), 93 cross-sectionally uniformized features across valuation, quality, momentum, risk, earnings estimates, and liquidity, with 1-, 3-, 6-, and 12-month forward return labels.
  • ML is no magic wand. Financial returns are noisy, easy anomalies get arbitraged away, and by the no-free-lunch theorem, inputs and framing matter more than model complexity.
  • Classic factors & testing. Portfolio sorts, long-short factors (SMB, HML, WML, RMW, CMA, BAB), two-pass Fama-MacBeth regressions, and factor competition (showing HML becomes redundant in Fama-French 2015 once RMW and CMA are included).
  • Replication crisis. Post-publication decay and ETF crowding (McLean & Pontiff), Harvey's higher t-statistic bar (t > 3), and ~12% publication-bias haircut (an 8% reported return is closer to ~7%).

Key Concepts

  • Uniformization — ranking each feature cross-sectionally on every date and mapping it evenly onto [0, 1] to control outliers and cross-date drift.
  • Asset pricing anomaly — a firm characteristic or long-short factor that explains cross-sectional returns beyond CAPM market beta.
  • Fama-MacBeth regression — two-pass estimation: time-series regressions estimate stock betas, then date-by-date cross-sectional regressions estimate factor risk premia.
  • No-free-lunch theorem — no single ML algorithm dominates across all problems; data quality and problem design dominate architecture tweaks.

Formulas

rt,n=αn+∑k=1Kβn,k ft,k+ϵt,nr_{t,n} = \alpha_n + \sum_{k=1}^{K} \beta_{n,k}\, f_{t,k} + \epsilon_{t,n}

Key Takeaways

  • Standardize features cross-sectionally at each date and label relative to the date's median so classes stay balanced across market regimes.
  • Evaluate every ML model against simple benchmarks and higher statistical hurdles (t > 3) to guard against data snooping and publication bias.
  • The ML portfolio workflow is an intertwined feedback loop from data processing through transaction-cost-aware backtesting.

Related Reading

Companion Research Article

Machine Learning for Factor Investing: A 9-Lesson Video Series on Coqueret & Guida

Coqueret & Guida's Machine Learning for Factor Investing in nine short lessons: factors, preprocessing, ridge/lasso, trees, neural nets, validation, backtesting, interpretability, and RL.

Comments

Disclaimer: This application is a personal proof of concept created for study and research purposes only. All analysis, suggestions, and content are generated by AI models using publicly available data and tools, and should not be considered as financial advice. Past performance is not indicative of future results. Always conduct your own research and consult with qualified financial professionals before making investment decisions. The app's AI models may have limitations and may not account for all market factors or recent developments. Users are solely responsible for their investment decisions and should understand that all investments involve risk.