pair-trading

Calculate rolling Z-scores of price ratios to generate long-short trading signals.

Updated Jul 29, 2026
One-click install
npx skills add https://github.com/santoosaraujo/vibe-trading-claude --skill pair-trading-santoosaraujo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pair-trading
Source: https://github.com/santoosaraujo/vibe-trading-claude/tree/main/.claude/skills/pair-trading
Command: npx skills add https://github.com/santoosaraujo/vibe-trading-claude --skill pair-trading-santoosaraujo

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pandas, numpy.

What problem does it solve?

This Skill addresses the challenge of identifying and trading price divergences between two correlated financial instruments, automating the detection of mean-reversion opportunities.

Core Features & Use Cases

  • Z-Score Analysis: Calculates the rolling Z-score of the price ratio between two assets to identify statistical extremes.
  • Automated Signal Generation: Provides clear long/short signals based on configurable entry and exit thresholds.
  • Use Case: Use this to trade pairs like BTC/ETH or correlated stocks by automatically entering positions when the spread deviates significantly from the historical mean and exiting when it reverts.

Quick Start

Use the pair-trading skill to generate signals for BTC-USDT and ETH-USDT using a 60-day lookback window.

Frequently Asked Questions about pair-trading

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

FAQPage Schema
How do I calculate the Z-score for a mean-reversion pair trading strategy?

For quantitative analysis of asset pairs, you need historical OHLCV market data formatted as a pandas DataFrame. The Skill uses numpy and pandas to evaluate rolling statistical deviations of the price ratio between two correlated financial instruments, such as BTC-USDT and ETH-USDT, to identify trading opportunities.

Can I use this to generate automated long-short trading signals for crypto pairs?

Yes, you can generate automated long-short trading signals for crypto pairs like BTC and ETH. The Skill evaluates the spread between correlated assets against a historical mean and outputs clear position instructions when the price ratio deviates significantly, based on a specified lookback window like 60 days.

What's the best way to identify statistical extremes in the price ratio of correlated assets?

The best way to identify statistical extremes in the price ratio of correlated assets is by applying rolling Z-score analysis. This approach measures how far the current spread deviates from its historical mean, allowing you to detect mean-reversion opportunities automatically without manual charting.

Does this pair trading approach require specific Python libraries to process time-series data?

Yes, this pair trading approach requires the pandas and numpy Python libraries to process time-series data. These dependencies are essential for performing the vectorized calculations needed to evaluate rolling statistical deviations and generate accurate mean-reversion signals on historical market data.