pair-trading

Calculate Z-scores of price ratios to generate mean-reversion trading signals.

Updated Jun 30, 2026
One-click install
npx skills add https://github.com/0xZKnw/vibe-trading-tap --skill pair-trading-0xzknw
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pair-trading
Source: https://github.com/0xZKnw/vibe-trading-tap/tree/main/agent/src/skills/pair-trading
Command: npx skills add https://github.com/0xZKnw/vibe-trading-tap --skill pair-trading-0xzknw

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pandas, numpy.

What problem does it solve?

This skill addresses the complexity of identifying and executing mean-reversion trades between two correlated assets, removing the need for manual monitoring of price spreads and Z-score calculations.

Core Features & Use Cases

  • Statistical Arbitrage: Automatically calculates the Z-score of the price ratio between two instruments to identify entry and exit points.
  • Long-Short Hedging: Executes simultaneous long and short positions to capitalize on price divergence while maintaining a market-neutral stance.
  • Use Case: Use this skill to monitor a pair like BTC-USDT and ETH-USDT, automatically triggering trades when their price ratio deviates significantly from the historical mean.

Quick Start

Use the pair-trading skill to analyze the price correlation and generate trading 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 automate mean-reversion pair trading strategies for crypto assets?

Mean-reversion pair trading strategies are automated by calculating the Z-score of the price ratio between two correlated financial instruments to generate long-short hedging signals based on statistical deviations.

How does a Z-score calculation identify statistical arbitrage entry and exit points?

Z-score calculation identifies statistical arbitrage opportunities by measuring how far the price ratio of two correlated assets deviates from its historical mean, triggering trades when the divergence reaches significant thresholds.

How do I calculate rolling window signals for long-short hedging using Python?

Rolling window signals for long-short hedging are calculated using pandas and numpy on OHLCV market data to evaluate continuous price ratio deviations and automatically trigger market-neutral trading positions.

Can I use pandas and numpy to monitor crypto price divergence for BTC and ETH?

Pandas and numpy can monitor crypto price divergence for assets like BTC-USDT and ETH-USDT by applying rolling window calculations over a specified lookback period to detect mean-reversion trade entries.

What is the best way to execute market-neutral statistical arbitrage between correlated instruments?

Market-neutral statistical arbitrage is executed by simultaneously opening long and short positions on two correlated instruments, capitalizing on price divergence while maintaining a hedged stance against broader market movements.

What data format is required for calculating price ratio Z-scores for quantitative trading?

OHLCV market data is required for calculating price ratio Z-scores, providing the necessary open, high, low, close, and volume inputs for quantitative trading signal generation and rolling window analysis.