Avatar

Tanish Patel

Data Scientist

Read Resume
thumbnail

Statistical Arbitrage: Factor-Based Mean Reversion Trading System

Quantitative FinanceStatistical ArbitrageFactor ModelsTime Series AnalysisAlgorithmic Trading

A multi-factor statistical arbitrage framework using PCA-based factor models, residual mean reversion, and systematic trade analytics

This project presents the design and implementation of a factor-based statistical arbitrage trading framework aimed at exploiting mean reversion in equity price dynamics. The system is built around the core hypothesis that asset returns can be decomposed into systematic factor components and idiosyncratic residuals, with the latter exhibiting statistically predictable reversion behavior over time.

The methodology begins with the construction of a dynamic factor model using Principal Component Analysis (PCA) applied to a cross-section of asset returns. These latent factors capture common market and sectoral movements, enabling the isolation of residual returns that are orthogonal to broad market behavior. Diagnostic analysis is performed to evaluate factor stability, variance explained, and residual stationarity, ensuring that the extracted signals are economically and statistically meaningful.

Trading signals are generated by modeling the residual processes as mean-reverting stochastic systems, with z-score normalization used to quantify deviations from equilibrium. Positions are entered when residuals exceed predefined statistical thresholds and exited as they revert toward their long-run mean. This approach allows for systematic, market-neutral trade construction while explicitly controlling exposure to common risk factors.

A comprehensive trade analytics module evaluates performance at both the trade and portfolio levels. Metrics such as cumulative returns, hit ratios, holding period distributions, drawdowns, and risk-adjusted performance are analyzed to assess the robustness of the strategy across different market conditions. The framework also enables detailed inspection of individual trades, providing transparency into signal behavior and execution outcomes.

The strategy is implemented in a modular research pipeline, separating factor diagnostics, signal generation, and trade evaluation. This design facilitates rapid experimentation with alternative factor definitions, reversion thresholds, and universe selections, while maintaining a clean and extensible codebase suitable for further research or production deployment.

The project demonstrates that factor-neutral statistical arbitrage can produce consistent mean-reversion signals when supported by rigorous diagnostics and disciplined trade analytics. Future extensions include dynamic factor re-estimation, transaction cost modeling, intraday signal refinement, and portfolio-level optimization across multiple statistical arbitrage strategies.

Learn More
2025 — Built by Tanish Patel