pair-trade-screener

Test cointegrated stock pairs and generate trade signals.

2|Updated Jun 14, 2026
One-click install
npx skills add https://github.com/IhsanDanish25/claude-trading-skills --skill pair-trade-screener-ihsandanish25
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pair-trade-screener
Source: https://github.com/IhsanDanish25/claude-trading-skills/tree/main/skills/pair-trade-screener
Command: npx skills add https://github.com/IhsanDanish25/claude-trading-skills --skill pair-trade-screener-ihsandanish25

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 and analyze pair trading opportunities by testing for cointegration, calculating hedge ratios, and providing entry/exit signals for market-neutral strategies.

Core Features & Use Cases

  • Cointegration Testing: Detects long-term equilibrium relationships between correlated stocks.
  • Hedge Ratio Calculation: Determines the optimal position sizing for market-neutral exposure.
  • Mean-Reversion Analysis: Measures how quickly prices revert to their equilibrium level.
  • Trade Signal Generation: Provides buy/sell recommendations based on statistical thresholds.
  • Use Case: Imagine you are a trader looking to identify pair trading opportunities in the tech sector. This Skill can screen the entire sector for cointegrated pairs, analyze their spread behavior, and generate trading signals.

Quick Start

Use the pair-trade-screener skill to find and analyze cointegrated pairs within the tech sector.

Frequently Asked Questions about pair-trade-screener

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

FAQPage Schema
How do I identify cointegrated pairs for statistical arbitrage trading?

To identify cointegrated pairs for statistical arbitrage, you need to test stock price relationships using ADF testing and OLS regression. This Skill screens sectors to find pairs with long-term equilibrium relationships and generates market-neutral trade signals.

What is the best way to calculate hedge ratios for a mean reversion trading strategy?

Calculating hedge ratios for a mean reversion strategy requires OLS regression to determine optimal position sizing for market-neutral exposure. This Skill automates that calculation while measuring AR(1) behavior to project how quickly spreads revert to equilibrium.

Can I screen an entire market sector for pair trading opportunities?

Yes, you can screen an entire market sector for pair trading opportunities by fetching historical price data via the Financial Modeling Prep API. The Skill processes sector stocks to detect cointegration and output actionable entry and exit signals.

What statistical methods are used to test for cointegration in pair trading?

Statistical methods used to test for cointegration in pair trading include the Augmented Dickey-Fuller (ADF) test for stationarity, Ordinary Least Squares (OLS) regression for hedge ratios, and AR(1) modeling to measure mean-reversion speed.

Do I need the Financial Modeling Prep API to run cointegration tests on stocks?

Yes, you need the Financial Modeling Prep API to fetch the historical price data required to run cointegration tests on stocks. The Skill uses this data to perform ADF testing, calculate hedge ratios, and generate trade signals.

Why does my mean reversion pair trade screen fail to find cointegrated stocks?

A mean reversion pair trade screen may fail to find cointegrated stocks if the ADF test reveals no long-term equilibrium relationship between the assets, or if historical price data lacks sufficient variance to establish reliable statistical thresholds.