Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

correlation-analysis

Skill by charliedream1

Correlation and cointegration analysis skill for finding co-moving assets, clustering sectors and generating pair-trading signals. Aimed at traders and quants working on pairs trading or portfolio risk.

  • Score 91
  • 6.8k stars
  • Apache-2.0
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install correlation-analysis

Built from the published package, never by AI.

git clone --depth 1 https://github.com/charliedream1/ai_quant_trade /tmp/ai_quant_trade && mkdir -p ~/.claude/skills && cp -r /tmp/ai_quant_trade/egs_skill/vibe_trading_skills/correlation-analysis ~/.claude/skills/correlation-analysis

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install correlation-analysis in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

correlation-analysis is an agent skill that describes correlation and cointegration workflows for pairs trading, portfolio construction and risk management. It covers four modes: co-movement discovery, bivariate return-correlation analysis, sector clustering with hierarchical linkage, and realized rolling correlation by market regime. Each mode includes Python code and screening tables.

The skill also outlines cointegration testing with Engle-Granger and Johansen methods, half-life, a Kalman dynamic hedge ratio, cross-market linkage analysis and pair-trading signal generation. The source is aimed at finance practitioners who need to screen asset universes and measure spread behavior. The cointegration section is cut off in the source file.

Written from the project's SKILL.md and checked against it.

What it can do

  • Co-movement discoveryScans a universe of assets for those most correlated with a target asset.
  • Bivariate correlation analysisComputes Pearson, Spearman and Kendall correlations, beta, R-squared and spread Z-Score.
  • Sector clusteringRuns hierarchical clustering on a correlation matrix with a heatmap and dendrogram.
  • Realized correlationBuilds rolling correlation series and correlation statistics by market regime.
  • Cointegration testingNamed in the description as Engle-Granger and Johansen tests, with half-life.
  • Kalman dynamic hedge ratioNamed in the description as a dynamic hedge ratio method.
  • Pair-trading signal generationNamed in the description as the final step from analytics to trading signals.

What you need

  • Python
  • pandas, numpy and scipy
  • statsmodels, matplotlib and seaborn

Try asking

  • Find stocks in my watchlist that are most correlated with NVDA
  • Cluster these 30 stocks into sectors using hierarchical clustering
  • Show how the rolling correlation between two ETFs changes in bear markets

Good to know

  • The cointegration section is incomplete in the source.
  • Regime labels use fixed thresholds set in the code, such as a 1.5 volatility multiple.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: egs_skill/vibe_trading_skills/correlation-analysis/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

  • SKILL.md38 KB

Alternatives to correlation-analysis

All alternatives →

Compare with meme-rush, okx-market or saas-metrics-coach

correlation-analysis: common questions

What correlation coefficients does it use?

It uses Pearson, Spearman and Kendall coefficients. The source advises reporting all three and giving Spearman more weight when Pearson and Spearman differ by more than 0.1.

Which linkage method does it recommend for sector clustering?

Ward linkage is the stated default recommendation for stock-sector discovery. Complete and average linkage are listed as alternatives.

Does it cover cointegration?

The description lists Engle-Granger and Johansen cointegration, half-life and a Kalman dynamic hedge ratio. The cointegration section in the source file is cut off.

How do I install correlation-analysis?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is correlation-analysis free?

The code is published under the Apache-2.0 licence. The service it connects to may have its own pricing.

Is correlation-analysis safe to use?

It scores 91 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to correlation-analysis?

Similar skills: meme-rush, okx-market, saas-metrics-coach, sec-edgar.

correlation-analysis Install

Add to stack

Loading.