pair-trade-screener

Screen stock pairs for cointegration and generate z-score entry/exit signals.

2.6k|600|Updated Oct 19, 2025
One-click install
npx skills add https://github.com/tradermonty/claude-trading-skills --skill pair-trade-screener
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pair-trade-screener
Source: https://github.com/tradermonty/claude-trading-skills/tree/main/skills/pair-trade-screener
Command: npx skills add https://github.com/tradermonty/claude-trading-skills --skill pair-trade-screener

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill helps traders identify statistically robust stock pairs that exhibit cointegration, enabling reliable mean-reversion trades and market-neutral portfolios with clearly defined entry and exit rules.

Core Features & Use Cases

  • Sector-based pair screening to scope candidates within Technology, Financials, and other sectors.
  • Cointegration testing and hedge ratio estimation to establish a lasting long/short relationship.
  • Z-score based entry/exit signals and ranked pair recommendations for practical trading ideas.
  • JSON output suitable for pipeline integration and backtesting workflows.

Quick Start

  • Run sector screening: python scripts/find_pairs.py --sector Technology --min-correlation 0.70 --lookback-days 730 --output technology_pairs.json
  • Analyze a top pair: python scripts/analyze_spread.py --stock-a AAPL --stock-b MSFT --lookback-days 365
  • Inspect results in technology_pairs.json and the generated analysis reports

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 a market-neutral trading strategy?

Find cointegrated stock pairs for market-neutral trading by screening sector-based universes, testing statistical cointegration, computing hedge ratios, and ranking actionable entry and exit opportunities based on spread z-scores.

How do I screen for mean-reverting stock pairs within a specific sector like Technology?

Screen for mean-reverting stock pairs by executing a Python script that filters sector candidates using a minimum correlation threshold and lookback window, then outputs a ranked JSON list of cointegrated symbols.

Do I need an FMP API key to fetch price data for cointegration testing?

Yes, you need an FMP API key to fetch the historical price data required for computing hedge ratios, testing cointegration, and generating mean-reversion entry and exit signals.

What Python libraries are required to test pair cointegration and calculate spread z-scores?

Testing pair cointegration and calculating spread z-scores requires Python libraries including pandas, numpy, scipy, and statsmodels to perform statistical analysis and estimate hedge ratios.

Can I use the pair screening output JSON directly in my backtesting workflow?

Yes, the pair screening output is formatted as JSON specifically suitable for pipeline integration, allowing you to directly feed the ranked pair recommendations and entry and exit signals into backtesting workflows.