Agent skill · data analytics · himself65

stock-correlation

Analyze how stocks move together using Yahoo Finance price history (yfinance): find correlated peers for a ticker, measure correlation, beta, and spread between specific tickers, cluster a group into a correlation matrix, and track rolling or regime-dependent correlation. Use this skill whenever the user asks what moves with a stock, what else drops when it drops, related tickers or sympathy plays, sector or supply-chain peers, pair trading or hedging pairs, beta or relative performance, correlation matrices, co-movement, or rolling/realized correlation — including well-known pairs like AMD/NVDA, GOOGL/AVGO, or LITE/COHR. With a single ticker, assume the user wants its correlated peers.

Why this skill is useful

Adds specific commands for analyzing stock correlations using historical data that the AI wouldn't reliably generate on its own.

What it needs

Requires numpy, pandas, yfinance installed locally. About 7k tokens when loaded. Last updated 2026-08-05. 3,127 stars on the source repository.

What this skill does

Stock Correlation Analysis Skill If your host has not already executed the shell probes below (for example, in Codex), run the commands inside the ! wrappers with its shell tool before choosing a setup path. Use the actual output; if shell access is unavailable, report that limitation. Finds and analyzes correlated stocks using historical price data from Yahoo Finance via yfinance. Routes to specialized sub-skills based on user intent. Important: This is for research and educational purposes only. Not financial advice. yfinance is not affiliated with Yahoo, Inc. --- Step 1: Ensure Dependencies Are Available Current environment status: If DEPSMISSING, install required packages before running any code: If all dependencies are already installed, skip the install step and proceed directly. --- Step 2: Route to the Correct Sub-Skill Classify the user's request and jump to the matching sub-skill section below. User Request Route To Examples --- --- --- Single ticker, wants to find related stocks Sub-Skill A: Co-movement Discovery "what correlates with NVDA", "find stocks related to AMD", "sympathy plays for TSLA" Two or more specific tickers, wants relationship details Sub-Skill B: Return Correlation "correlation between AMD and NVDA", "how do LITE and COHR move together", "compare AAPL vs MSFT" Group of tickers, wants structure/grouping Sub-Skill C: Sector Clustering "correlation matrix for FAANG", "cluster these semiconductor stocks", "sector peers for AMD" Wants time-varying or conditional correlation Sub-Skill D: Realized Correlation "rolling correlation AMD NVDA", "when NVDA drops what else drops", "how has correlation changed" If ambiguous, default to Sub-Skill A (Co-movement Discovery) for single tickers, or Sub-Skill B (Return Correlation) for two tickers. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills himself65/stock-correlation

View the source on GitHub

Browse the @skills marketplace