Agent skill

Pair Trade Screener

by tradermonty in tradermonty/claude-trading-skills

Statistical arbitrage tool for identifying and analyzing pair trading opportunities.

MITAuto-check passedBusiness, Finance & HR

Install Pair Trade Screener

skills CLI
$ npx skills add tradermonty/claude-trading-skills --skill pair-trade-screener -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install tradermonty/claude-trading-skills pair-trade-screener --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/tradermonty/claude-trading-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/pair-trade-screener .claude/skills/pair-trade-screener && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
pair-trade-screener
GitHub stars
3k
Used in
3 other repos
Token cost
~5.1k tokens
SKILL.md length
1,859 words
Files
11 (incl. scripts, references)
Skills in repo
74
Repo updated
First seen
Licence
MIT

At a glance

Statistical arbitrage tool for identifying and analyzing pair trading opportunities.

  • Works in 8 steps: Define Pair Universe → Retrieve Historical Price Data → Calculate Correlation and Beta → …
  • User requests pair trading opportunities
  • SKILL.md covers Overview, When to Use This Skill, Prerequisites and Analysis Workflow, plus 10 more sections
  • Runs Python scripts from its folder; calls uv; needs FMP_API_KEY

What it does

Pair Trade Screener is an agent skill from tradermonty/claude-trading-skills. 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.

Its SKILL.md is about 5.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 13 other files, including scripts and reference files (for example `README.md`, `references/cointegration_guide.md` and `references/methodology.md`).

It sits in Business, Finance & HR, covering Trading and backtesting. The repository describes itself as: Claude Code skills for equity investors and traders — market analysis, technical charting, economic calendars, screeners, and trading strategy development. The licence is MIT.

When your agent uses it

  • User requests pair trading opportunities
  • Statistical arbitrage screening
  • Mean-reversion strategies
  • Market-neutral portfolio construction

Example prompts

  • “/pair-trade-screener”

Requirements

  • Python 3
  • A credential in FMP_API_KEY
  • A credential in YOUR_API_KEY

Workflow steps

8 steps, taken from the step headings in SKILL.md.

  1. Define Pair Universe
  2. Retrieve Historical Price Data
  3. Calculate Correlation and Beta
  4. Cointegration Testing
  5. Spread Analysis and Z-Score Calculation
  6. Generate Entry/Exit Recommendations
  7. Position Sizing and Risk Management
  8. Generate Pair Analysis Report

What it can do on your machine

Read from SKILL.md and the folder at commit c8d58f0. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 6 files in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • uv

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • statsmodels.org

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • FMP_API_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Pair Trade Screener loads about 5.1k tokens when it runs, and up to ~16k if it reads all its reference files. Until then it costs about 126 tokens; SKILL.md has 1,859 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~126
When it runs · the whole SKILL.md, loaded when a task matches
~5.1k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~16k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from tradermonty/claude-trading-skills at commit c8d58f0, republished under its MIT licence (© tradermonty). 1,859 words, ~5,144 tokens.

Download SKILL.mdSave it as .claude/skills/pair-trade-screener/SKILL.md (or your agent's skills folder). This skill also uses 10 other files; get the full folder from GitHub.
name
pair-trade-screener
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.

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>"

Run the scripts from the repository root with the statistical dependency isolated to the command:

bash
uv run --with 'statsmodels>=0.14,<0.15' python \
  skills/pair-trade-screener/scripts/find_pairs.py \
  --symbols AAPL,MSFT \
  --output /tmp/pair-trade/pairs.json

Analysis Workflow

Step 1: Define Pair Universe

Objective: Establish the pool of stocks to analyze for pair relationships.

Option A: Sector-Based Screening (Recommended)

Select a specific sector to screen:

  • Technology
  • Financials
  • Healthcare
  • Consumer Discretionary
  • Industrials
  • Energy
  • Materials
  • Consumer Staples
  • Utilities
  • Real Estate
  • Communication Services

Option B: Custom Stock List

User provides specific tickers to analyze:

Example: ["AAPL", "MSFT", "GOOGL", "META", "NVDA"]

Option C: Industry-Specific

Narrow focus to specific industry within sector:

  • Example: "Software" within Technology sector
  • Example: "Regional Banks" within Financials

Filtering Criteria:

  • Minimum market cap: $2B (mid-cap and above)
  • Minimum average volume: 1M shares/day (liquidity requirement)
  • Active trading: No delisted or inactive stocks
  • Same exchange preference: Avoid cross-exchange complications
Step 2: Retrieve Historical Price Data

Objective: Fetch price history for correlation and cointegration analysis.

Data Requirements:

  • Timeframe: 2 years (minimum 252 trading days)
  • Frequency: Daily closing prices
  • Adjustments: Adjusted for splits and dividends
  • Clean data: No gaps or missing values

FMP API Endpoint:

GET /v3/historical-price-full/{symbol}?apikey=YOUR_API_KEY

Data Validation:

  • Verify consistent date ranges across all symbols
  • Remove stocks with >10% missing data
  • Fill minor gaps with forward-fill method
  • Log data quality issues

Script Execution:

bash
uv run --with 'statsmodels>=0.14,<0.15' python \
  skills/pair-trade-screener/scripts/find_pairs.py \
  --sector Technology \
  --lookback-days 730 \
  --output /tmp/pair-trade/technology.json
Step 3: Calculate Correlation and Beta

Objective: Identify candidate pairs with strong linear relationships.

Correlation Analysis:

For each pair of stocks (i, j) in the universe:

  1. Calculate Pearson correlation coefficient (ρ)
  2. Calculate rolling correlation (90-day window) for stability check
  3. Filter pairs with ρ >= 0.70 (strong positive correlation)

Correlation Interpretation:

  • ρ >= 0.90: Very strong correlation (best candidates)
  • ρ 0.70-0.90: Strong correlation (good candidates)
  • ρ 0.50-0.70: Moderate correlation (marginal)
  • ρ < 0.50: Weak correlation (exclude)

Beta Calculation:

For each candidate pair (Stock A, Stock B):

Beta = Covariance(A, B) / Variance(B)

Beta indicates the hedge ratio:

  • Beta = 1.0: Equal dollar amounts
  • Beta = 1.5: $1.50 of B for every $1.00 of A
  • Beta = 0.8: $0.80 of B for every $1.00 of A

Correlation Stability Check:

  • Calculate correlation over multiple periods (6mo, 1yr, 2yr)
  • Require correlation to be stable (not deteriorating)
  • Flag pairs where recent correlation < historical correlation by >0.15
Step 4: Cointegration Testing

Objective: Statistically validate long-term equilibrium relationship.

Why Cointegration Matters:

  • Correlation measures short-term co-movement
  • Cointegration proves long-term equilibrium relationship
  • Cointegrated pairs mean-revert predictably
  • Non-cointegrated pairs may diverge permanently

Augmented Dickey-Fuller (ADF) Test:

For each correlated pair:

  1. Calculate spread: Spread = Price_A - (Beta × Price_B)
  2. Run ADF test on spread series
  3. Check p-value: p < 0.05 indicates cointegration (reject null hypothesis of unit root)
  4. Extract ADF statistic for strength ranking

Cointegration Interpretation:

  • p-value < 0.01: Very strong cointegration (★★★)
  • p-value 0.01-0.05: Moderate cointegration (★★)
  • p-value > 0.05: No cointegration (exclude)

Half-Life Calculation:

Estimate mean-reversion speed:

Half-Life = -log(2) / log(mean_reversion_coefficient)
  • Half-life < 30 days: Fast mean-reversion (good for short-term trading)
  • Half-life 30-60 days: Moderate speed (standard)
  • Half-life > 60 days: Slow mean-reversion (long holding periods)

Python Implementation:

python
from statsmodels.tsa.stattools import adfuller

# Calculate spread
spread = price_a - (beta * price_b)

# ADF test
result = adfuller(spread)
adf_stat = result[0]
p_value = result[1]

# Interpret
is_cointegrated = p_value < 0.05
Step 5: Spread Analysis and Z-Score Calculation

Objective: Quantify current spread deviation from equilibrium.

Spread Calculation:

Two common methods:

Method 1: Price Difference (Additive)

Spread = Price_A - (Beta × Price_B)

Best for: Stocks with similar price levels

Method 2: Price Ratio (Multiplicative)

Spread = Price_A / Price_B

Best for: Stocks with different price levels, easier interpretation

Z-Score Calculation:

Measures how many standard deviations spread is from its mean:

Z-Score = (Current_Spread - Mean_Spread) / Std_Dev_Spread

Z-Score Interpretation:

  • Z > +2.0: Stock A expensive relative to B (short A, long B)
  • Z > +1.5: Moderately expensive (watch for entry)
  • Z -1.5 to +1.5: Normal range (no trade)
  • Z < -1.5: Moderately cheap (watch for entry)
  • Z < -2.0: Stock A cheap relative to B (long A, short B)

Historical Spread Analysis:

  • Calculate mean and std dev over 90-day rolling window
  • Plot historical z-score distribution
  • Identify maximum historical z-score deviations
  • Check for structural breaks (spread regime change)
Step 6: Generate Entry/Exit Recommendations

Objective: Provide actionable trading signals with clear rules.

Entry Conditions:

Conservative Approach (Z ≥ ±2.0):

LONG Signal:
- Z-score < -2.0 (spread 2+ std devs below mean)
- Spread is mean-reverting (cointegration p < 0.05)
- Half-life < 60 days
→ Action: Buy Stock A, Short Stock B (hedge ratio = beta)

SHORT Signal:
- Z-score > +2.0 (spread 2+ std devs above mean)
- Spread is mean-reverting (cointegration p < 0.05)
- Half-life < 60 days
→ Action: Short Stock A, Buy Stock B (hedge ratio = beta)

Aggressive Approach (Z ≥ ±1.5):

  • Lower threshold for more frequent trades
  • Higher win rate but smaller avg profit per trade
  • Requires tighter risk management

Exit Conditions:

Primary Exit: Mean Reversion (Z = 0)

Exit when spread returns to mean (z-score crosses 0)
→ Close both legs simultaneously

Secondary Exit: Partial Profit Take

Exit 50% when z-score reaches ±1.0
Exit remaining 50% at z-score = 0

Stop Loss:

Exit if z-score extends beyond ±3.0 (extreme divergence)
Risk: Possible structural break in relationship

Time-Based Exit:

Exit after 90 days if no mean-reversion
Prevents holding broken pairs indefinitely
Step 7: Position Sizing and Risk Management

Objective: Determine dollar amounts for market-neutral exposure.

Market Neutral Sizing:

For a pair (Stock A, Stock B) with beta = β:

Equal Dollar Exposure:

If portfolio size = $10,000 allocated to this pair:
- Long $5,000 of Stock A
- Short $5,000 × β of Stock B

Example (β = 1.2):
- Long $5,000 Stock A
- Short $6,000 Stock B
→ Market neutral, beta = 0

Position Sizing Considerations:

  • Total pair allocation: 10-20% of portfolio per pair
  • Maximum pairs: 5-8 active pairs for diversification
  • Correlation across pairs: Avoid highly correlated pairs

Risk Metrics:

  • Maximum loss per pair: 2-3% of total portfolio
  • Stop loss trigger: Z-score > ±3.0 or -5% loss on spread
  • Portfolio-level risk: Sum of all pair risks ≤ 10%
Step 8: Generate Pair Analysis Report

Objective: Create structured markdown report with findings and recommendations.

Report Sections:

  1. Executive Summary

    • Total pairs analyzed
    • Number of cointegrated pairs found
    • Top 5 opportunities ranked by statistical strength
  2. Cointegrated Pairs Table

    • Pair name (Stock A / Stock B)
    • Correlation coefficient
    • Cointegration p-value
    • Current z-score
    • Trade signal (Long/Short/None)
    • Half-life
  3. Detailed Analysis (Top 10 Pairs)

    • Pair description
    • Statistical metrics
    • Current spread position
    • Entry/exit recommendations
    • Position sizing
    • Risk assessment
  4. Spread Charts (Text-Based)

    • Historical z-score plot (ASCII art)
    • Entry/exit levels marked
    • Current position indicator
  5. Risk Warnings

    • Pairs with deteriorating correlation
    • Structural breaks detected
    • Low liquidity warnings

File Naming Convention:

pair_trade_analysis_[SECTOR]_[YYYY-MM-DD].md

Example: pair_trade_analysis_Technology_2025-11-08.md

Show full SKILL.md (787 more words)Show less

Output

find_pairs.py creates the requested parent directory and writes one JSON object with metadata and pairs keys. Each pair includes the correlation, hedge ratio, ADF result, half-life, current z-score, signal, and generation timestamp. Progress and a ranked summary are written to stdout. File-system errors produce a concise stderr message and a nonzero exit.

analyze_spread.py writes a single-pair statistical report to stdout and does not create files. Both commands reject invalid or non-finite thresholds, insufficient lookback windows, and duplicate symbols before making API requests. Missing statsmodels produces an install command on stderr without a traceback.

Quality Standards

Statistical Rigor

Minimum Requirements for Valid Pair:

  • ✓ Correlation ≥ 0.70 over 2-year period
  • ✓ Cointegration p-value < 0.05 (ADF test)
  • ✓ Spread stationarity confirmed
  • ✓ Half-life < 90 days
  • ✓ No structural breaks in recent 6 months

Red Flags (Exclude Pair):

  • Correlation dropped >0.20 in recent 6 months
  • Cointegration p-value > 0.05
  • Half-life increasing over time (mean-reversion weakening)
  • Significant corporate events (merger, spin-off, bankruptcy risk)
  • Liquidity concerns (avg volume < 500K shares/day)
Practical Considerations

Transaction Costs:

  • Assume 0.1% round-trip cost per leg
  • Total cost per pair = 0.4% (entry + exit, both legs)
  • Minimum z-score threshold should exceed transaction costs

Short Selling:

  • Verify stock is shortable (not hard-to-borrow)
  • Factor in short interest costs (borrow fees)
  • Monitor short squeeze risk

Execution:

  • Enter/exit both legs simultaneously (avoid leg risk)
  • Use limit orders to control slippage
  • Pre-locate shorts before entry

Available Scripts

scripts/find_pairs.py

Purpose: Screen for cointegrated pairs within a sector or custom list.

Usage:

bash
# Sector-based screening
uv run --with 'statsmodels>=0.14,<0.15' python \
  skills/pair-trade-screener/scripts/find_pairs.py \
  --sector Technology \
  --min-correlation 0.70 \
  --output /tmp/pair-trade/technology.json

# Custom stock list
uv run --with 'statsmodels>=0.14,<0.15' python \
  skills/pair-trade-screener/scripts/find_pairs.py \
  --symbols AAPL,MSFT,GOOGL,META \
  --min-correlation 0.75 \
  --output /tmp/pair-trade/custom.json

# Full options
uv run --with 'statsmodels>=0.14,<0.15' python \
  skills/pair-trade-screener/scripts/find_pairs.py \
  --sector Financials \
  --min-correlation 0.70 \
  --min-market-cap 2000000000 \
  --lookback-days 730 \
  --output /tmp/pair-trade/financials.json

Parameters:

  • --sector: Sector name (Technology, Financials, etc.)
  • --symbols: Comma-separated list of tickers (alternative to sector)
  • --min-correlation: Minimum correlation threshold (default: 0.70)
  • --min-market-cap: Minimum market cap filter (default: $2B)
  • --lookback-days: Historical data period (default: 730 days)
  • --output: Output JSON file (default: pair_analysis.json)
  • --api-key: FMP API key (or set FMP_API_KEY env var)

Output:

json
[
  {
    "pair": "AAPL/MSFT",
    "stock_a": "AAPL",
    "stock_b": "MSFT",
    "correlation": 0.87,
    "beta": 1.15,
    "cointegration_pvalue": 0.012,
    "adf_statistic": -3.45,
    "half_life_days": 42,
    "current_zscore": -2.3,
    "signal": "LONG",
    "strength": "Strong"
  }
]
scripts/analyze_spread.py

Purpose: Analyze a specific pair's spread behavior and generate trading signals.

Usage:

bash
# Analyze specific pair
uv run --with 'statsmodels>=0.14,<0.15' python \
  skills/pair-trade-screener/scripts/analyze_spread.py \
  --stock-a AAPL \
  --stock-b MSFT

# Custom lookback period
uv run --with 'statsmodels>=0.14,<0.15' python \
  skills/pair-trade-screener/scripts/analyze_spread.py \
  --stock-a JPM \
  --stock-b BAC \
  --lookback-days 365 \
  --entry-zscore 2.0 \
  --exit-zscore 0.5

Parameters:

  • --stock-a: First stock ticker
  • --stock-b: Second stock ticker
  • --lookback-days: Analysis period (default: 365)
  • --entry-zscore: Z-score threshold for entry (default: 2.0)
  • --exit-zscore: Z-score threshold for exit (default: 0.0)
  • --api-key: FMP API key

Output:

  • Current spread analysis
  • Z-score calculation
  • Entry/exit recommendations
  • Position sizing
  • Historical z-score chart (text)

Reference Documentation

references/methodology.md

Comprehensive guide to statistical arbitrage and pair trading:

  • Pair Selection Criteria: How to identify good pair candidates
  • Statistical Tests: Correlation, cointegration, stationarity
  • Spread Construction: Price difference vs price ratio approaches
  • Mean Reversion: Half-life calculation and interpretation
  • Risk Management: Position sizing, stop losses, diversification
  • Common Pitfalls: Survivorship bias, look-ahead bias, overfitting
references/cointegration_guide.md

Deep dive into cointegration testing:

  • What is Cointegration?: Intuitive explanation
  • ADF Test: Step-by-step procedure
  • P-Value Interpretation: Statistical significance thresholds
  • Half-Life Estimation: AR(1) model approach
  • Structural Breaks: Testing for regime changes
  • Practical Examples: Case studies with real pairs

Integration with Other Skills

Sector Analyst Integration:

  • Use Sector Analyst to identify sectors in rotation
  • Screen for pairs within outperforming sectors
  • Pairs in leading sectors may have stronger trends

Technical Analyst Integration:

  • Confirm pair entry/exit with individual stock technicals
  • Check support/resistance levels before entry
  • Validate trend direction aligns with spread signal

Backtest Expert Integration:

  • Feed pair candidates to Backtest Expert for validation
  • Test historical z-score entry/exit rules
  • Optimize threshold parameters (entry z-score, stop loss)
  • Walk-forward analysis for robustness

Market Environment Analysis Integration:

  • Avoid pair trading during extreme volatility (VIX > 30)
  • Correlations break down in crisis periods
  • Prefer pair trading in sideways/range-bound markets

Portfolio Manager Integration:

  • Track multiple pair positions
  • Monitor overall market-neutral exposure
  • Calculate portfolio-level pair trading P/L
  • Rebalance hedge ratios periodically

Important Notes

  • All analysis and output in English
  • Statistical foundation: No discretionary interpretation
  • Market neutral focus: Minimize directional beta exposure
  • Data quality critical: Garbage in, garbage out
  • Requires FMP API key: Free tier sufficient for basic screening
  • Python dependencies: pandas, numpy, scipy, requests, and statsmodels>=0.14,<0.15

Common Use Cases

Use Case 1: Technology Sector Pairs

User: "Find pair trading opportunities in tech stocks"

Workflow:
1. Screen Technology sector for stocks with market cap > $10B
2. Calculate all pairwise correlations
3. Filter pairs with correlation ≥ 0.75
4. Run cointegration tests
5. Identify current z-score extremes (|z| > 2.0)
6. Generate top 10 pairs report

Use Case 2: Specific Pair Analysis

User: "Analyze AAPL and MSFT as a pair trade"

Workflow:
1. Fetch 2-year price history for AAPL and MSFT
2. Calculate correlation and beta
3. Test for cointegration
4. Calculate current spread and z-score
5. Generate entry/exit recommendation
6. Provide position sizing guidance

Use Case 3: Regional Bank Pairs

User: "Screen for pairs among regional banks"

Workflow:
1. Filter Financials sector for industry = "Regional Banks"
2. Exclude banks with <$5B market cap
3. Calculate pairwise statistics
4. Rank by cointegration strength
5. Focus on pairs with half-life < 45 days
6. Report top 5 mean-reverting pairs

Troubleshooting

Problem: No cointegrated pairs found

Solutions:

  • Expand universe (lower market cap threshold)
  • Relax cointegration p-value to 0.10
  • Try different sectors (Utilities often cointegrate well)
  • Increase lookback period to 3 years

Problem: All z-scores near zero (no trade signals)

Solutions:

  • Normal market condition (pairs in equilibrium)
  • Check back later or expand universe
  • Lower entry threshold to ±1.5 instead of ±2.0

Problem: Pair correlation broke down

Solutions:

  • Check for corporate events (earnings, guidance changes)
  • Verify no M&A activity or restructuring
  • Remove pair from watchlist if structural break confirmed
  • Monitor for 30 days before re-entering

API Requirements

  • Required: FMP API key (free tier sufficient)
  • Rate Limits: ~250 requests/day on free tier
  • Data Usage: ~2 requests per symbol for 2-year history
  • Upgrade: Professional plan ($29/mo) recommended for frequent screening

Resources


Version: 1.0 Last Updated: 2025-11-08 Dependencies: Python 3.8+, pandas, numpy, scipy, statsmodels, requests

© tradermonty, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 10 other files (scripts, references) in skills/pair-trade-screener of tradermonty/claude-trading-skills.

  • SKILL.md
  • README.md
  • references/cointegration_guide.md
  • references/methodology.md
  • requirements.txt
  • scripts/analyze_spread.py
  • scripts/find_pairs.py
  • scripts/statsmodels_support.py
  • scripts/tests/conftest.py
  • scripts/tests/test_find_pairs_screener.py
  • scripts/tests/test_pair_statistics_and_cli.py

Open the folder on GitHubat commit c8d58f0

Used in 3 other repositories

We found 3 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 3 other GitHub owners. This page covers the copy in tradermonty/claude-trading-skills, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Pair Trade Screener next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Pair Trade Screener compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Pair Trade Screener this skilltradermonty/claude-trading-skills3k3 repos~5.1kAutomated safety check: PassMIT
Tushare Datazillionare/zillionare3222 repos~2.3kAutomated safety check: PassNone
Tradingview MCPatilaahmettaner/tradingview-mcp5k—~1.3kAutomated safety check: PassMIT
Digital Oraclekomako-workshop/digital-oracle878—~5.9kAutomated safety check: PassMIT
Polyclawchainstacklabs/polyclaw3591 repos~2kAutomated safety check: PassApache-2.0
Markdownfacioquo/stock-indicators-dotnet1.2k—~812Automated safety check: PassApache-2.0

Similar skills

  • Tushare Data

    zillionare/zillionare

    面向中文自然语言的 Tushare 数据研究技能。用于把“看看这只股票最近怎么样”“帮我查财报趋势”“最近哪个板块最强”“北向资金在买什么”“给我导出一份行情数据”这类请求,转成可执行的数据获取、清洗、对比、筛选、导出与简要分析流程。适用于 A 股、指数、ETF/基金、财务、估值、资金流、公告新闻、板块概念与宏观数据等研究场景。

    322 GitHub starsUsed in 2 repos~2.3k tokens
    Business, Finance & HRAuto-check passed
  • Tradingview MCP

    atilaahmettaner/tradingview-mcp

    AI Trading Intelligence — live prices, 30+ technical indicators, backtesting (6 strategies), walk-forward overfitting detection, trade logs, equity curves, licensed news sentiment (Marketaux), and…

    5k GitHub stars~1.3k tokensUpdated yesterday
    Business, Finance & HRAuto-check passed
  • Digital Oracle

    komako-workshop/digital-oracle

    Answer prediction questions using market trading data, not opinions.

    878 GitHub stars~5.9k tokensUpdated 2 mo ago
    Business, Finance & HRAuto-check passed
  • Polyclaw

    chainstacklabs/polyclaw

    Trade on Polymarket via split + CLOB execution. An agent skill from chainstacklabs/polyclaw.

    359 GitHub starsUsed in 1 repo~2k tokens
    Business, Finance & HRAuto-check passed
  • Markdown

    facioquo/stock-indicators-dotnet

    Format and lint Markdown in this repository against GitHub Flavored Markdown and its markdownlint-cli2 configuration — headers, lists, code fences, callouts (VitePress containers on docs-site pages…

    1.2k GitHub stars~812 tokensUpdated yesterday
    Business, Finance & HRAuto-check passed
  • Openmobius Skill

    MobiusQuant/OpenMobius-skill

    Provides multi-school trading Q&A, chart/OHLCV analysis, annotation, and fresh-market workflows covering ICT/SMC, ChanLun, Wyckoff, Price Action, Order Flow, VSA, and Elliott Wave.

    697 GitHub stars~7.2k tokensUpdated 1 mo ago
    Business, Finance & HRAuto-check passed

More from tradermonty/claude-trading-skills

All 74 skills in this repo
  • Technical Analyst

    tradermonty/claude-trading-skills

    This skill should be used when analyzing weekly price charts for stocks, stock indices, cryptocurrencies, or forex pairs.

    3k GitHub starsUsed in 4 repos~4.6k tokens
    Auto-check passed
  • Theme Detector

    tradermonty/claude-trading-skills

    Detect and analyze trending market themes across sectors. An agent skill from tradermonty/claude-trading-skills.

    3k GitHub starsUsed in 2 repos~4.9k tokens
    Auto-check passed
  • Trader Memory Core

    tradermonty/claude-trading-skills

    Track investment theses across their lifecycle — from screening idea to closed position with postmortem.

    3k GitHub starsUsed in 2 repos~4.3k tokens
    Auto-check passed
  • Edge Strategy Reviewer

    tradermonty/claude-trading-skills

    Critically review strategy drafts from edge-strategy-designer for edge plausibility, overfitting risk, sample size adequacy, and execution realism.

    3k GitHub starsUsed in 1 repo~988 tokens
    Auto-check passed
  • Sector Analyst

    tradermonty/claude-trading-skills

    This skill should be used when analyzing sector rotation patterns and market cycle positioning.

    3k GitHub starsUsed in 1 repo~2.3k tokens
    Auto-check passed
  • Stanley Druckenmiller Investment

    tradermonty/claude-trading-skills

    Druckenmiller Strategy Synthesizer - Integrates 8 upstream skill outputs (Market Breadth, Uptrend Analysis, Market Top, Macro Regime, FTD Detector, VCP Screener, Theme Detector, CANSLIM Screener)…

    3k GitHub starsUsed in 1 repo~2k tokens
    Auto-check passed

Questions about Pair Trade Screener

What does Pair Trade Screener do?

Statistical arbitrage tool for identifying and analyzing pair trading opportunities. Pair Trade Screener is an agent skill from tradermonty/claude-trading-skills. Statistical arbitrage tool for identifying and analyzing pair trading opportunities.

When should I use Pair Trade Screener?

Pair Trade Screener fits situations like: user requests pair trading opportunities; statistical arbitrage screening; mean-reversion strategies; market-neutral portfolio construction.

How do I install Pair Trade Screener in Claude Code?

Run `npx skills add tradermonty/claude-trading-skills --skill pair-trade-screener -a claude-code`. Or copy the skill folder (skills/pair-trade-screener in tradermonty/claude-trading-skills) into .claude/skills/pair-trade-screener in your project. Claude Code loads it when a task matches its description.

How do I install Pair Trade Screener in Codex?

Run `npx skills add tradermonty/claude-trading-skills --skill pair-trade-screener -a codex`. Or copy the skill folder (skills/pair-trade-screener in tradermonty/claude-trading-skills) into .agents/skills/pair-trade-screener in your project. Codex loads it when a task matches its description.

Can I use Pair Trade Screener in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add tradermonty/claude-trading-skills --skill pair-trade-screener -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/pair-trade-screener, .gemini/skills/pair-trade-screener, .github/skills/pair-trade-screener and .opencode/skills/pair-trade-screener in your project.

What does Pair Trade Screener need to run?

Going by SKILL.md and its folder, Pair Trade Screener needs Python for the scripts in its folder, the command-line tools its instructions call (uv) and credentials named FMP_API_KEY. Our summary lists: Python 3; A credential in FMP_API_KEY; A credential in YOUR_API_KEY.

Does Pair Trade Screener access the network?

SKILL.md names 1 domain. As links in the text: statsmodels.org. This is read from the text; nothing was executed.

Is Pair Trade Screener safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Pair Trade Screener use?

Pair Trade Screener is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Pair Trade Screener use?

About 5.1k tokens (SKILL.md is roughly 21k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 11k tokens, read only when the agent opens those files.

What are the alternatives to Pair Trade Screener?

Skills that share tags, products or a category with Pair Trade Screener: Tushare Data (zillionare/zillionare, 322 stars), Tradingview MCP (atilaahmettaner/tradingview-mcp, 5k stars), Digital Oracle (komako-workshop/digital-oracle, 878 stars) and Polyclaw (chainstacklabs/polyclaw, 359 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Pair Trade Screener?

tradermonty (a GitHub user) maintains it in tradermonty/claude-trading-skills, which has 2,982 GitHub stars. The repository holds 74 skills in this directory. The repository was last updated on October 11, 2026.

Source: tradermonty/claude-trading-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.