Skills

Pair Trade Screener

Statistical arbitrage tool for identifying and analyzing pair trading opportunities.

Install

npx skills add tradermonty/claude-trading-skills --skill pair-trade-screener -g -a claude-code -y
Category
Testing
Updated
3d ago
License
MIT
Context cost
Mediumabout 3,000 tokens
Runs scripts
Yes, review before use

What it does

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.

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:

export FMP_API_KEY="<fmp-api-key>"
Read the whole SKILL.md on GitHub

More in Testing