All Projects

Honest Factor Research

Open Source

Reproducible Audit Framework for Stock Factor Models

The Problem

Factor models in quantitative finance look great on paper. Most are inflated by hidden pathologies: sector mirrors, proxy contamination, regime shifts, and overconfident statistics.

The Solution

Built a framework that systematically audits 4 pathologies across 2,944 US stocks, 28 factors, and 20 years of data. Uses RidgeCV regression, Politis-Romano block bootstrap, and VIX-stratified regime analysis.

Technical Highlights

  • Politis-Romano block bootstrap implemented from scratch in NumPy
  • Gram-Schmidt residualization to isolate proxy effects between factors
  • VIX-stratified regime betas — factor stability across crash/normal/boom markets
  • YAML-driven factor catalog — 28 factors configurable without code changes
  • Proper Python packaging (pyproject.toml), installable as library
  • GitHub Actions CI matrix (Python 3.11 + 3.12), ruff, mypy, pytest

Tech Stack

Core

Python 3.11+NumPypandas 2.0scikit-learn (RidgeCV)

Data

yfinanceNASDAQ Screener APIpyarrow

Analysis

Block BootstrapGram-SchmidtRegime Betas

Quality

ruffmypypytest + coverageGitHub Actions CI

Key Numbers

2,944 US stocks28 factors20 years of data4 pathology audits