correlation-analysis

Identify correlation and cointegration relationships across assets for pairs trading.

30.4k|4.9k|Updated Apr 1, 2026
One-click install
npx skills add https://github.com/HKUDS/Vibe-Trading --skill correlation-analysis-hkuds
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: correlation-analysis
Source: https://github.com/HKUDS/Vibe-Trading/tree/main/agent/src/skills/correlation-analysis
Command: npx skills add https://github.com/HKUDS/Vibe-Trading --skill correlation-analysis-hkuds

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Trading analysts need a structured way to identify assets that move together, verify their long-run equilibrium, and monitor how those relationships behave across regimes before committing to pairs strategies.

Core Features & Use Cases

  • Multi-mode correlation studies for co-movement scans, deep return-level diagnostics, sector clustering, and realized correlation across regimes.
  • Cointegration and hedge-ratio tooling covering Engle-Granger, Johansen, half-life estimation, Kalman dynamic ratios, and lead-lag/FX-adjusted cross-market linkage.
  • Signal generation workflow that screens candidates, validates spread stability, and produces shepherded z-score trading signals with guardrails for mean-reverting opportunities.

Quick Start

Ask correlation-analysis to scan a target security, rank its correlated peers, run cointegration tests, and flag trade-ready pairs with key metrics.

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 trading?

Cointegration testing validates whether assets share a long-run equilibrium, whereas correlation only measures co-movement. Cointegration is necessary to ensure spread stability for mean-reverting pairs trading signals.

How do I calculate dynamic hedge ratios for pairs trading?

You can calculate dynamic hedge ratios using Kalman filter tooling. This estimates half-life and adjusts ratios across regimes, providing rolling metrics that satisfy rigorous cross-market linkage and quant research requirements.

What is the best way to generate mean-reverting trading signals?

The best way to generate mean-reverting signals is screening cointegrated candidates, validating spread stability, and producing shepherded z-score trading signals with guardrails. This workflow ensures statistical rigor before committing to pairs strategies.

Does regime-aware realized correlation work for cross-market linkage scenarios?

Yes, regime-aware realized correlation works for cross-market linkage scenarios. It evaluates how relationships behave across regimes, incorporating FX-adjusted metrics and lead-lag effects to support portfolio construction and hedge selection.

When should I not use correlation scans for portfolio construction?

You should not rely solely on correlation scans when assets lack long-run equilibrium. Without passing cointegration tests and validating spread stability, high correlation alone may fail to produce reliable mean-reverting pairs trading opportunities.