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.
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-analysisRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/HKUDS/Vibe-Trading /tmp/Vibe-Trading && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/Vibe-Trading/agent/src/skills/correlation-analysis ~/.gemini/antigravity-cli/skills/correlation-analysisAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Step-by-step: install correlation-analysis in Antigravity CLI
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
ANo 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 →Lists live launchpad token feeds and AI-detected hot topics for meme tokens on BSC, Solana and Base. Covers new, finalizing and just-migrated tokens on launchpads such as Pump.fun and Four.meme.
The okx-market skill lets an AI assistant retrieve cryptocurrency market data from the OKX V5 REST API. It is aimed at users who want spot, derivatives and index data in Python without an account.
Calculates key SaaS health metrics such as ARR, churn, LTV and CAC from raw business numbers, then gives prioritized advice. Built for founders and finance leads who share revenue or customer figures.
Fetches U.S. SEC EDGAR data for research. It resolves a ticker to its CIK, lists recent filings with primary-document URLs, and pulls XBRL financial series. Built for analysts who need free, U.S.-only filing data.
Provides free, no-auth access to Eastmoney market data for A-shares, Hong Kong stocks and US stocks. It covers fund flows, dragon-tiger lists, financial statements and stock screening.
Reads and manages a user's QuickBooks business through Intuit's official MCP server. It answers finance questions from reports, invoices, customers, products and benchmarks, and completes approved actions.
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.
