correlation-analysis

Perform cointegration and correlation analysis on financial asset price series.

Updated Jun 30, 2026
One-click install
npx skills add https://github.com/20YN04/vibe-trading-macos --skill correlation-analysis-20yn04
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: correlation-analysis
Source: https://github.com/20YN04/vibe-trading-macos/tree/main/agent/src/skills/correlation-analysis
Command: npx skills add https://github.com/20YN04/vibe-trading-macos --skill correlation-analysis-20yn04

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This skill solves the challenge of identifying and validating long-run equilibrium relationships between financial assets, which is essential for effective pairs trading and risk management.

Core Features & Use Cases

  • Co-movement Discovery: Scan large asset universes to find highly correlated candidates for potential pairs trading.
  • Deep Analytics: Perform comprehensive bivariate analysis including Beta, Z-Score, and regime-conditional correlation.
  • Cointegration Framework: Utilize Engle-Granger and Johansen tests to confirm statistical long-run equilibrium, avoiding spurious correlation traps.
  • Use Case: A trader can use this to identify a pair of stocks that are historically cointegrated, calculate their dynamic hedge ratio using a Kalman filter, and generate automated entry/exit signals based on Z-Score deviations.

Quick Start

Use the correlation-analysis skill to perform an Engle-Granger cointegration test on the price series of asset A and asset B to determine if they are suitable for a pairs trading strategy.

Frequently Asked Questions about correlation-analysis

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

FAQPage Schema
How do I test for cointegration between two assets for pairs trading?

You test for cointegration using Engle-Granger or Johansen tests on asset price series to confirm long-run statistical equilibrium. This avoids spurious correlation traps, validating the pair's suitability for generating automated entry and exit trading signals.

What is the difference between correlation and cointegration in quantitative finance?

Correlation measures short-term co-movement between assets, while cointegration confirms a long-run statistical equilibrium. This skill uses cointegration frameworks to validate correlation relationships, ensuring pairs trading strategies are built on genuine equilibrium rather than spurious statistical links.

Can I estimate dynamic hedge ratios using a Kalman filter in Python?

Yes, you can estimate dynamic hedge ratios using a Kalman filter in Python. This skill supports dynamic hedge ratio estimation alongside regime-conditional correlation modeling, enabling adaptive risk management and precise Z-Score deviation tracking for quantitative pairs trading signals.

How do I find highly correlated stock pairs across a large asset universe?

You find highly correlated stock pairs by scanning large asset universes for co-movement discovery. This skill performs multi-asset sector clustering and rigorous bivariate analysis including Beta and Z-Score to identify optimal candidates for quantitative pairs trading strategies.

Do I need statsmodels and scipy to perform regime-conditional correlation modeling?

Yes, statsmodels and scipy are required dependencies for regime-conditional correlation modeling. This skill relies on pandas, numpy, scipy, statsmodels, matplotlib, and seaborn to perform rigorous statistical analysis and validate cointegration relationships between financial assets.

When should I avoid using correlation analysis for cross-market transmission analysis?

You should avoid using basic correlation analysis without cointegration testing when identifying cross-market transmission, as spurious correlations can produce false signals. This skill mitigates that risk by applying Engle-Granger tests to confirm true statistical equilibrium.