backtest-expert
Expert guidance for systematic backtesting of trading strategies. Use when developing,…
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
$ npx -y skills add tradermonty/claude-trading-skills --skill pair-trade-screener --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/pair-trade-screenerContext preview
The summary Claude sees to decide when to auto-load this skill.
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
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.
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:**
**Key Advantages:**
Use this skill when:
Example user requests:
Set the API key without placing it on the command line or in a committed file:
export FMP_API_KEY="<fmp-api-key>"
Run the scripts from the repository root with the statistical dependency isolated to the command:
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
**Objective:** Establish the pool of stocks to analyze for pair relationships.
**Option A: Sector-Based Screening (Recommended)**
Select a specific sector to screen:
**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:
**Filtering Criteria:**
**Objective:** Fetch price history for correlation and cointegration analysis.
**Data Requirements:**
**FMP API Endpoint:**
GET /v3/historical-price-full/{symbol}?apikey=YOUR_API_KEY**Data Validation:**
**Script Execution:**
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
**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:**
**Beta Calculation:**
For each candidate pair (Stock A, Stock B):
Beta = Covariance(A, B) / Variance(B)
Beta indicates the hedge ratio:
**Correlation Stability Check:**
**Objective:** Statistically validate long-term equilibrium relationship.
**Why Cointegration Matters:**
**Augmented Dickey-Fuller
Claude Trading Skills started as a personal project to use AI to improve my own trading process. Claude Trading Skills is a Claude Skills-based trading workflow toolkit for time-constrained individual investors.
Expert guidance for systematic backtesting of trading strategies. Use when developing,…
This skill should be used when analyzing market breadth charts, specifically the S&P 500…
Generate Minervini-style breakout trade plans from VCP screener output with worst-case risk…
Screen US stocks using William O'Neil's CANSLIM growth stock methodology. Use when user…
Synthesize the three Jason Shapiro contrarian-pipeline verdicts (COT crowding, news-reaction…
Detect crowded speculative positioning in CFTC futures markets (COT report analysis) to find…