correlation-analysis

Analyze financial time series for correlation, cointegration, and mean-reversion signals.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pandas, numpy, scipy, statsmodels, matplotlib, seaborn.

What problem does it solve?

This skill solves the challenge of identifying stable, long-term relationships between financial assets, which is essential for pairs trading, risk management, and portfolio diversification.

Core Features & Use Cases

  • Co-Movement Discovery: Scan large asset universes to find highly correlated candidates for trading strategies.
  • Cointegration Framework: Use Engle-Granger and Johansen tests to verify long-run equilibrium relationships, ensuring your pairs aren't just coincidentally correlated.
  • Dynamic Hedge Ratios: Utilize Kalman filters to adapt to shifting market regimes, ensuring your hedge ratios remain accurate over time.
  • Use Case: A trader can use this skill to identify a pair of stocks that historically move together, verify their cointegration, and generate Z-score signals to trade mean-reversion when the spread deviates from its historical norm.

Quick Start

Use the correlation-analysis skill to identify cointegrated pairs within the B3 index and generate trading signals for the top candidates.

Frequently Asked Questions about correlation-analysis

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

FAQPage Schema
How do I find cointegrated pairs for a pairs trading strategy?

To find cointegrated pairs for pairs trading, you scan an asset universe using Engle-Granger and Johansen tests to verify long-run equilibrium relationships, ensuring the pairs aren't just coincidentally correlated. This process identifies stable mean-reversion opportunities.

How do I calculate dynamic hedge ratios using a Kalman filter?

You calculate dynamic hedge ratios using a Kalman filter to adapt to shifting market regimes, ensuring your hedge ratios remain accurate over time. This method updates the ratio continuously as new time series data arrives.

Do I need pandas and statsmodels to perform mean reversion analysis?

Yes, you need pandas, numpy, scipy, and statsmodels to perform mean reversion analysis. These dependencies are required to execute the quantitative finance workflows, statistical tests, and signal generation processes.

What's the best way to generate Z-score trading signals from a spread?

The best way to generate Z-score trading signals from a spread is to identify cointegrated stocks, calculate their historical spread, and trigger mean-reversion trades when the spread deviates from its historical norm.

Can I use multi-asset clustering to discover market co-movement?

Yes, you can use multi-asset clustering to discover market co-movement. This skill scans large asset universes to find highly correlated candidates and supports regime-conditional correlation studies for trading and diversification.