stock-correlation
快速定位行业同类与交易对,便于对冲与研究
基于历史价格数据找出相关股票和交易配对
用历史价格数据算出哪些股票会一起涨跌,帮你找出相关公司、行业同类和可做配对交易的标的。适合做行业比较、配对交易、对冲或研究“同动”与 beta 关系时用。能输出相关矩阵、滚动相关等指标,数据通常来自 yfinance,方便直观判断共振与替代关系。
▸ 展开 SKILL.md 英文原文
Analyze stock correlations to find related companies and trading pairs. Use when the user asks about correlated stocks, related companies, sector peers, trading pairs, or how two or more stocks move together. Triggers: "what correlates with NVDA", "find stocks related to AMD", "correlation between AAPL and MSFT", "what moves with", "sector peers", "pair trading", "correlated stocks", "when NVDA drops what else drops", "stocks that move together", "beta to", "relative performance", "supply chain partners", "correlation matrix", "co-movement", "related tickers", "sympathy plays", "semiconductor peers", "hedging pair", "realized correlation", "rolling correlation", or any request about stocks that move in tandem or inversely. Also triggers for well-known pairs like AMD/NVDA, GOOGL/AVGO, LITE/COHR. If only one ticker is provided, infer the user wants correlated peers.
帮我安装这个 skill:https://raw.githubusercontent.com/himself65/finance-skills/main/plugins/market-analysis/skills/stock-correlation/SKILL.mdcurl -fsSL "https://raw.githubusercontent.com/himself65/finance-skills/main/plugins/market-analysis/skills/stock-correlation/SKILL.md"# Stock Correlation Analysis Skill
Finds 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.
**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:**
```
!`python3 -c "import yfinance, pandas, numpy; print(f'yfinance={yfinance.__version__} pandas={pandas.__version__} numpy={numpy.__version__}')" 2>/dev/null || echo "DEPS_MISSING"`
```
If `DEPS_MISSING`, install required packages before running an