{"repo":"XanderRobbins/Universal-Pairs-Trading-System","free":true,"listed":false,"github":"https://github.com/XanderRobbins/Universal-Pairs-Trading-System","clone":"git clone https://github.com/XanderRobbins/Universal-Pairs-Trading-System.git","description":"A professional-grade quantitative trading system that implements statistical arbitrage through mean-reversion strategies on cointegrated asset pairs.","language":"Python","stars":10,"topics":["algorithmic-trading","backtracking","cointegration","econometrics","mean-reversion","numpy","pairs-trading","pandas","python","quantitative-finance"],"license":null,"category":"trading","readme_excerpt":"Universal Pairs Trading System A Python backtesting framework for statistical arbitrage on cointegrated asset pairs. Implements mean-reversion signal generation, ATR-based risk management, and comprehensive performance analysis. Works with any two assets available through yfinance: stocks, ETFs, futures (e.g., CL=F), and forex pairs. --- What it does Given two historically cointegrated assets, the system: 1. Validates the pair statistically (Engle-Granger, Johansen, ADF, half-life) 2. Computes a hedge-ratio-adjusted log spread 3. Generates long/short signals when the z-score deviates beyond a threshold 4. Applies regime detection and volatility-adjusted entry thresholds 5. Sizes positions using ATR-based risk budgeting 6. Runs a backtest with transaction costs and slippage 7. Outputs performance metrics, charts, and a trade journal CSV --- Files File Purpose ------ --------- config.py All configuration parameters (pair, strategy, risk, backtest, output) data handler.py Data download, cleaning, cointegration tests, hedge ratio, spread computation strategy.py Signal generation: z-score, regime detection, momentum filter, position management backtester.py Return calculation, transaction costs, equity curve, drawdown, performance metrics risk manager.py ATR-based position sizing, stop-loss/take-profit, portfolio heat limits visualization.py Price charts, spread analysis, equity curve, trade distribution, monthly heatmap main.py Orchestration: runs the full pipeline end-to-end, in","default_branch":null,"files":null,"tree":[],"storefront":"/r/XanderRobbins","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/XanderRobbins/Universal-Pairs-Trading-System/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}