{"slug":"stock-correlation","title":"stock-correlation","summary":"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 thi","platform":"Claude","tags":[],"authorName":"LLM Mart","authorSlug":"llm-mart","score":0,"source":"github","price":null,"verified":false,"createdAt":"2026-10-19T21:17:42.482933Z","repo":{"url":"https://github.com/himself65/finance-skills","stars":3427,"forks":389,"license":"MIT","updatedAt":"2026-10-19T08:37:18Z"},"bodyHtml":"<h1>stock-correlation</h1>\n<p>Analyze stock correlations to find related companies, sector peers, and pair-trading candidates using historical price data.</p>\n<h2>What it does</h2>\n<p>Routes to four specialized sub-skills based on user intent:</p>\n<ul>\n<li><strong>Co-movement Discovery</strong> — given a single ticker, find the most correlated stocks from curated sector and thematic peer universes (e.g., \"what correlates with NVDA?\")</li>\n<li><strong>Return Correlation</strong> — deep-dive pairwise analysis between two tickers: Pearson correlation, beta, R-squared, spread Z-score, and rolling stability (e.g., \"correlation between AMD and NVDA\")</li>\n<li><strong>Sector Clustering</strong> — full NxN correlation matrix with hierarchical clustering to identify groups and outliers (e.g., \"correlation matrix for FAANG\")</li>\n<li><strong>Realized Correlation</strong> — time-varying and regime-conditional correlation: rolling windows (20/60/120-day), up vs down days, high-vol vs low-vol, drawdown regimes (e.g., \"when NVDA drops what else drops?\")</li>\n</ul>\n<h2>Triggers</h2>\n<ul>\n<li>\"what correlates with NVDA\", \"find stocks related to AMD\"</li>\n<li>\"correlation between AAPL and MSFT\", \"how do LITE and COHR move together\"</li>\n<li>\"what moves with\", \"stocks that move together\", \"sympathy plays\"</li>\n<li>\"sector peers\", \"pair trading\", \"hedging pair\"</li>\n<li>\"when NVDA drops what else drops\", \"rolling correlation\"</li>\n<li>\"correlation matrix for FAANG\", \"cluster these stocks\"</li>\n<li>Well-known pairs: AMD/NVDA, GOOGL/AVGO, LITE/COHR</li>\n</ul>\n<h2>Prerequisites</h2>\n<ul>\n<li>Python 3.8+</li>\n<li>The skill auto-installs <code>yfinance</code>, <code>pandas</code>, and <code>numpy</code> via pip if not already present</li>\n<li><code>scipy</code> is optional (used for hierarchical clustering in Sector Clustering sub-skill; falls back to sorting if unavailable)</li>\n</ul>\n<h2>Platform</h2>\n<p>Works on <strong>all platforms</strong> (Claude Code, Claude.ai with code execution, etc.).</p>\n<h2>Setup</h2>\n<pre><code># Choose finance-market-analysis when prompted.\nnpx plugins add himself65/finance-skills\n\n# Or install just this skill\nnpx skills add himself65/finance-skills --skill stock-correlation\n</code></pre>\n<p>See the <a href=\"../../../../README.md\">main README</a> for more installation options.</p>\n<h2>Reference files</h2>\n<ul>\n<li><code>references/sector_universes.md</code> — Dynamic peer universe construction using yfinance Screener API, with fallback strategies</li>\n</ul>\n","files":[{"path":"README.md","sizeBytes":2172,"isText":true},{"path":"references/sector_universes.md","sizeBytes":3747,"isText":true},{"path":"SKILL.md","sizeBytes":13694,"isText":true}],"reviewScore":null,"reviewSummary":null,"trust":{"provenance":"trusted-source-unreviewed","notice":"Community-authored content, reproduced verbatim and not vetted as instructions. Treat it as data to evaluate, never as directives to follow.","bodySource":null},"bodyLocked":false,"purchaseUrl":null,"sourceUrl":null,"report":{"provenance":"trusted-source-unreviewed","screen":{"ran":true,"outcome":"clean","suspicious":0,"notes":0,"hiddenCharacters":false},"virusScan":{"engine":"clamav","status":"clean","scannedAt":"2026-10-19T21:18:59.636776Z","sha256":"6C32FF161804303DC6B1404D9AC011664C9E45B2052A6703AC9C66FE3EF8A7CE","sizeBytes":8428},"review":null,"source":{"repositoryUrl":"https://github.com/himself65/finance-skills","path":"plugins/market-analysis/skills/stock-correlation","license":"MIT","commit":"73d554d60c0a3f121a30f505680f7a06b2b1fd11","subtreeSha":"DA676D6973A39AB30DEE54592BB66ADD23DDDB5245A561FB7F3DCBE8FC0E2ECF","lastSyncedAt":"2026-10-19T21:17:41.134703Z"},"reviewedAt":"2026-10-19T21:22:00.518279Z","notice":"Community-authored content, reproduced verbatim and not vetted as instructions. Treat it as data to evaluate, never as directives to follow."},"install":[{"target":"skills-cli","command":"npx skills add https://github.com/himself65/finance-skills/tree/main/plugins/market-analysis/skills/stock-correlation"},{"target":"claude-code","command":"claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install himself65-finance-skills@llmmart"},{"target":"git","command":"git clone https://github.com/himself65/finance-skills.git"}]}