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 HKUDS

correlation-analysis is an agent skill from HKUDS for correlation and cointegration analysis of asset returns. It covers co-movement discovery, pair screening, sector clustering and rolling correlation. It is aimed at pairs trading, portfolio construction and risk management.

  • Score 91
  • 39k stars
  • MIT
  • 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/HKUDS/Vibe-Trading /tmp/Vibe-Trading && mkdir -p ~/.claude/skills && cp -r /tmp/Vibe-Trading/agent/src/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 from HKUDS for correlation and cointegration analysis of asset returns. It covers four modes: co-movement discovery, deep bivariate return-correlation analysis, sector clustering, and realized correlation with market regime labels. Each mode includes Python code built on pandas, scipy and statsmodels.

The skill also describes a cointegration testing framework, cross-market linkage analysis and pair-trading signal generation. Its declared description adds half-life and a Kalman dynamic hedge ratio, but the excerpt does not include code for those parts. A screening table maps correlation levels above 0.8, from 0.6 to 0.8, and below 0.6 to follow-up actions. It is aimed at people building pairs trading, portfolio construction and risk management workflows.

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

What it can do

  • Co-movement discoveryScans a universe of return series and ranks assets most correlated with a target.
  • Bivariate correlation analysisReports Pearson, Spearman and Kendall coefficients plus OLS beta, alpha and R squared.
  • Spread Z-scoreBuilds a hedge-ratio spread for two assets and computes its rolling Z-score.
  • Sector clusteringRuns hierarchical clustering on a correlation matrix with heatmap and dendrogram output.
  • Realized correlationComputes rolling correlations over 20, 60 and 120 day windows.
  • Regime-conditional correlationSplits correlation by bull, bear, sideways and high-volatility market regimes.
  • Cointegration screeningApplies cointegration tests to the top-K candidate set to keep long-run linked pairs.
  • Pair-trading signalsListed in the declared description. The excerpt does not include its code.

What you need

  • Python
  • pandas
  • numpy
  • scipy
  • statsmodels

Try asking

  • Find the assets most correlated with NVDA in my universe of daily returns.
  • Cluster these stock return series into sectors and show a correlation heatmap.
  • Compute the rolling 60-day correlation and spread Z-score for two assets.

Good to know

  • The excerpt does not include the code for the cointegration, half-life, Kalman and pair-trading sections.
  • Regime windows are set per market: 252 days for US equity, 244 for A-share and 365 for crypto.
  • Pearson is less reliable when returns have heavy tails or many outliers, so the skill suggests Spearman in those cases.

Security check

A

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

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

Inside the skill

  • SKILL.md39 KB

Alternatives to correlation-analysis

All alternatives →

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

correlation-analysis: common questions

What statistics does correlation-analysis compute?

It computes Pearson, Spearman and Kendall correlations, OLS beta and R squared, rolling correlation and spread Z-scores. The description also lists cointegration, half-life and a Kalman dynamic hedge ratio.

Which Python libraries does correlation-analysis use?

The code imports pandas, numpy, scipy, statsmodels, matplotlib and seaborn. Those are the libraries the source calls for.

How does the skill label market regimes?

It labels days as bull, bear, sideways or high-volatility using a rolling mean of benchmark returns and volatility. The window length depends on the market type.

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 MIT 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.