⬡ Pure Mechanics

A multi-factor backtesting framework

A full pipeline from raw data to signals

2026.09.22· 1 min readPythonquantbacktestfactors
A multi-factor backtesting framework
Source
Python / pandas / numpy
Duration
2026
Venue
https://github.com/

This project implements a lightweight multi-factor backtesting framework, aiming to shorten the path from research to backtest.

Pipeline

  1. Cleaning — halts, adjustments, outliers
  2. Factor computation — batch factor exposures
  3. Cross-sectional processing — winsorize, standardize, neutralize by industry and size
  4. Portfolio construction — constrained optimization
  5. Attribution — Brinson attribution plus turnover analysis
# factor neutralization
from project.factors import neutralize, standardize

f = standardize(raw_factor)
f = neutralize(f, industry=industry, size=log_mktcap)

The whole framework emphasizes reproducibility: configs, data versions and results are all persisted.


→ Back to Pure MechanicsSay something
More

More from this channel