stock-correlation
Agent skill fromhimself65/finance-skills
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.
How to install stock-correlation
npx skills add himself65/finance-skills# or add only this skill to Claude Code: copy the folder
plugins/market-analysis/skills/stock-correlation/
# into
~/.claude/skills/stock-correlation/ (all projects)
.claude/skills/stock-correlation/ (one project)
1# Stock Correlation Analysis Skill23If 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.45Finds and analyzes correlated stocks using historical price data from Yahoo Finance via [yfinance](https://github.com/ranaroussi/yfinance). Routes to specialized sub-skills based on user intent.67**Important**: This is for research and educational purposes only. Not financial advice. yfinance is not affiliated with Yahoo, Inc.89---1011## Step 1: Ensure Dependencies Are Available1213**Current environment status:**1415```16!`python3 -c "exec('try:\n import yfinance, pandas, numpy\n print(f\'yfinance={yfinance.__version__} pandas={pandas.__version__} numpy={numpy.__version__}\')\nexcept Exception:\n print(\'DEPS_MISSING\')')"`17```1819If `DEPS_MISSING`, install required packages before running any code:2021```python22import subprocess, sys23subprocess.check_call([sys.executable, "-m", "pip", "install", "-q", "yfinance", "pandas", "numpy"])24```2526If all dependencies are already installed, skip the install step and proceed directly.2728---2930## Step 2: Route to the Correct Sub-Skill3132Classify the user's request and jump to the matching sub-skill section below.3334| User Request | Route To | Examples |35|---|---|---|36…
Excerpt shown under the repository's MIT license.
