pair-trade-screener

Identify cointegrated stock pairs and output ranked JSON results.

Updated Mar 25, 2026
One-click install
npx skills add https://github.com/MileniumTick/skills --skill pair-trade-screener-mileniumtick
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pair-trade-screener
Source: https://github.com/MileniumTick/skills/tree/main/skills/pair-trade-screener
Command: npx skills add https://github.com/MileniumTick/skills --skill pair-trade-screener-mileniumtick

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pandas, numpy, scipy, statsmodels, requests, and includes scripts (resource) and references (resource) components.

What problem does it solve?

The Pair Trade Screener identifies statistically significant cointegrated stock pairs and ranks them for mean-reversion trading, enabling data-driven, market-neutral opportunities.

Core Features & Use Cases

  • Correlation and hedge ratio calculation to pair stocks.
  • Cointegration testing (ADF) to confirm mean-reverting spreads.
  • Half-life estimation and z-score driven entry/exit signals.
  • Sector-based screening or custom symbol lists with a ranked results output.

Quick Start

Run a sector screen to generate a JSON report of cointegrated pairs and top opportunities.

Frequently Asked Questions about pair-trade-screener

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I find cointegrated stock pairs for mean-reversion trading?

To find cointegrated stock pairs for mean-reversion trading, you can screen stocks by sector or custom symbol lists and apply statistical tests to rank pairs based on correlation, hedge ratio, and cointegration p-value.

How does cointegration testing identify mean-reverting stock spreads?

Cointegration testing identifies mean-reverting spreads by applying the ADF test to confirm a stationary relationship between paired stocks, calculating half-life and z-score metrics to signal entry and exit points.

Do I need Python and pandas to calculate hedge ratios and z-scores for pair screening?

Yes, pair screening requires Python with pandas, numpy, scipy, and statsmodels to calculate hedge ratios, perform ADF cointegration tests, and estimate half-life for mean-reversion analysis.

Can I screen custom stock symbol lists instead of using sector-based screening for pair trading?

Yes, you can screen custom stock symbol lists instead of sector-based screening, receiving a ranked JSON results file and console summary of cointegrated pairs with metrics like z-score and half-life.

What is the best way to rank cointegrated pairs by half-life and z-score?

The best way to rank cointegrated pairs by half-life and z-score is to run a sector screen or custom list, outputting a JSON report that sorts pairs based on statistical significance and current spread metrics.

Why does my pair screening require historical price data from the FMP API?

Pair screening requires historical price data from the FMP API to calculate correlation, compute hedge ratios, and run ADF cointegration tests necessary for identifying statistically significant mean-reversion opportunities.