# Pair Trade Screener

Statistical arbitrage tool for identifying and analyzing pair trading opportunities.

- Repository: https://github.com/tradermonty/claude-trading-skills (3536 stars)
- Category: Testing
- License: MIT
- Last updated: 2026-11-01
- Runs scripts: yes, review before use

## Install

Claude Code: `npx skills add tradermonty/claude-trading-skills --skill pair-trade-screener -g -a claude-code -y`
Codex: `npx skills add tradermonty/claude-trading-skills --skill pair-trade-screener -g -a codex -y`
Cursor: `npx skills add tradermonty/claude-trading-skills --skill pair-trade-screener -g -a cursor -y`
Gemini CLI: `npx skills add tradermonty/claude-trading-skills --skill pair-trade-screener -g -a gemini-cli -y`

## Description

Statistical arbitrage tool for identifying and analyzing pair trading opportunities. Detects cointegrated stock pairs within sectors, analyzes spread behavior, calculates z-scores, and provides entry/exit recommendations for market-neutral strategies. Use when user requests pair trading opportunities, statistical arbitrage screening, mean-reversion strategies, or market-neutral portfolio construction. Supports correlation analysis, cointegration testing, and spread backtesting.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Pair Trade Screener

## Overview

This skill identifies and analyzes statistical arbitrage opportunities through pair trading. Pair trading is a market-neutral strategy that profits from the relative price movements of two correlated securities, regardless of overall market direction. The skill uses rigorous statistical methods including correlation analysis and cointegration testing to find robust trading pairs.

**Core Methodology:**
- Identify pairs of stocks with high correlation and similar sector/industry exposure
- Test for cointegration (long-term statistical relationship)
- Calculate spread z-scores to identify mean-reversion opportunities
- Generate entry/exit signals based on statistical thresholds
- Provide position sizing for market-neutral exposure

**Key Advantages:**
- Market-neutral: Profits in up, down, or sideways markets
- Risk management: Limited exposure to broad market movements
- Statistical foundation: Data-driven, not discretionary
- Diversification: Uncorrelated to traditional long-only strategies

## When to Use This Skill

Use this skill when:
- User asks for "pair trading opportunities"
- User wants "market-neutral strategies"
- User requests "statistical arbitrage screening"
- User asks "which stocks move together?"
- User wants to hedge sector exposure
- User requests mean-reversion trade ideas
- User asks about relative value trading

Example user requests:
- "Find pair trading opportunities in the tech sector"
- "Which stocks are cointegrated?"
- "Screen for statistical arbitrage opportunities"
- "Find mean-reversion pairs"
- "What are good market-neutral trades right now?"

## Prerequisites

- Python 3.9 or newer
- An FMP API key with access to the company screener and historical-price endpoints
- `statsmodels>=0.14,<0.15` for ADF and autoregression calculations

Set the API key without placing it on the command line or in a committed file:

```bash
export FMP_API_KEY="<fmp-api-key>"
```

The rest: https://github.com/tradermonty/claude-trading-skills/blob/HEAD/skills/pair-trade-screener/SKILL.md
