correlation-analysis

Analyze correlation and cointegration between financial asset pairs.

Updated May 25, 2026
One-click install
npx skills add https://github.com/NigarumOvum/AutoTrading --skill correlation-analysis-nigarumovum
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: correlation-analysis
Source: https://github.com/NigarumOvum/AutoTrading/tree/main/Vibe-Trading/agent/src/skills/correlation-analysis
Command: npx skills add https://github.com/NigarumOvum/AutoTrading --skill correlation-analysis-nigarumovum

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pandas, numpy, scipy, statsmodels, matplotlib, seaborn, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill provides comprehensive correlation and cointegration analysis tools to help traders discover co-movement patterns, assess market relationships, and generate pair-trading signals.

Core Features & Use Cases

  • Correlation Analysis: Analyze co-movement between assets using Pearson, Spearman, and Kendall correlation coefficients.
  • Cointegration Testing: Perform Engle-Granger and Johansen cointegration tests to identify long-run equilibrium relationships.
  • Sector Clustering: Discover sector structure and identify similar assets using hierarchical clustering.
  • Realized Correlation: Analyze dynamic correlation by market regime to understand how correlation evolves over time.
  • Pair-Trading Signal Generation: Generate trading signals based on cointegration analysis and spread behavior.
  • Use Case: A trader looking to identify potential pair-trading opportunities would use this Skill to analyze the correlation and cointegration between two asset pairs, generate trading signals, and monitor the performance of their trading strategy.

Quick Start

Run the correlation-analysis skill on asset pairs 'AAPL' and 'MSFT' to identify potential trading opportunities.

Frequently Asked Questions about correlation-analysis

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

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

Cointegration testing for pairs trading uses Engle-Granger and Johansen tests to identify long-run equilibrium relationships between asset pairs. This Skill applies these statistical tests directly to financial time series data to detect co-movement suitable for statistical arbitrage strategies.

What correlation coefficients work best for financial time series analysis?

Financial time series correlation analysis can use Pearson, Spearman, and Kendall coefficients to measure asset co-movement. This Skill calculates all three methods, allowing traders to compare linear versus rank-based relationships when evaluating portfolio construction and risk management scenarios.

Can I generate pair-trading signals based on spread behavior using Python?

Pair-trading signal generation based on spread behavior is fully supported using Python. This Skill analyzes cointegration residuals and spread dynamics to produce actionable trading signals, leveraging statsmodels and scipy for the underlying statistical computations.

Does this cointegration analysis tool require specific Python libraries?

Cointegration analysis requires pandas, numpy, scipy, statsmodels, matplotlib, and seaborn. These dependencies handle data manipulation, statistical testing, and visualization of correlation matrices, clustering results, and spread behavior for comprehensive financial relationship analysis.

What is the difference between correlation and cointegration in trading?

Correlation measures short-term co-movement between assets, while cointegration identifies long-run equilibrium relationships. This Skill distinguishes both by calculating correlation coefficients and performing Engle-Granger and Johansen tests, ensuring robust pairs trading and risk management decisions.

Can I analyze dynamic correlation by market regime using hierarchical clustering?

Dynamic correlation by market regime is analyzed through realized correlation tracking and hierarchical clustering. This Skill applies clustering to discover sector structure and similar assets, helping traders understand how correlation evolves across varying market conditions.