How rsingh1010/mean-reversion-pairs-trading works
This repository is a Jupyter-based quantitative research project evaluating a cointegration mean-reversion strategy against an independent SPY benchmark. The documented workflow separates training and test periods, screens economically selected pairs, tests cointegration with multiple-testing correction, builds and evaluates a strategy, and reports diagnostics. The only source path in the tree is the notebook; its contents were not sampled, so components use that path and links follow the README’s stated methodology rather than verified notebook calls.
Main entry points: mean_reversion_trading_system.ipynb Reported Results
Components 18
Pair Research
- Research Notebook
notebooks/mean_reversion_trading_system.ipynb - Price Data
notebooks/mean_reversion_trading_system.ipynb - Train/Test Split
notebooks/mean_reversion_trading_system.ipynb - Candidate Selection
notebooks/mean_reversion_trading_system.ipynb - Correlation Filter
notebooks/mean_reversion_trading_system.ipynb - Cointegration Test
notebooks/mean_reversion_trading_system.ipynb - FDR Correction
notebooks/mean_reversion_trading_system.ipynb
Strategy Evaluation
- Hedge and Spread
notebooks/mean_reversion_trading_system.ipynb - Trading Signals
notebooks/mean_reversion_trading_system.ipynb - Costed Backtest
notebooks/mean_reversion_trading_system.ipynb - Out-of-Sample Evaluation
notebooks/mean_reversion_trading_system.ipynb - SPY Benchmark
notebooks/mean_reversion_trading_system.ipynb
Results and Diagnostics
- Reported Results
notebooks/mean_reversion_trading_system.ipynb - Cost Sensitivity
notebooks/mean_reversion_trading_system.ipynb - FDR Fragility
notebooks/mean_reversion_trading_system.ipynb - Yearly Stability
notebooks/mean_reversion_trading_system.ipynb
Other components
- Researcher
- yfinance
Connections 21
- Researcher → Research Notebook: runs
- Research Notebook → yfinance: requests prices
- yfinance → Price Data: provides prices
- Price Data → Train/Test Split: separates periods
- Train/Test Split → Candidate Selection: supplies training data
- Candidate Selection → Correlation Filter: screens pairs
- Correlation Filter → Cointegration Test: filters candidates
- Cointegration Test → FDR Correction: supplies p-values
- FDR Correction → Hedge and Spread: selects pair
- Hedge and Spread → Trading Signals: defines spread
- Trading Signals → Costed Backtest: generates trades
- Costed Backtest → Out-of-Sample Evaluation: evaluates test window
- Train/Test Split → SPY Benchmark: supplies test window
- Out-of-Sample Evaluation → Reported Results: reports metrics
- SPY Benchmark → Reported Results: reports comparison
- Costed Backtest → Cost Sensitivity: varies costs
- FDR Correction → FDR Fragility: assesses test count
- Out-of-Sample Evaluation → Yearly Stability: compares yearly returns
- Cost Sensitivity → Reported Results: informs findings
- FDR Fragility → Reported Results: informs findings
- Yearly Stability → Reported Results: informs findings