Stock Correlation AnalysisFinance Skill
A stock correlation analysis skill using yfinance, pandas, and numpy. 3-step process: (1) ensure dependencies (auto-install yfinance/pandas/numpy via pip if missing); (2) route to correct sub-skill based on user intent; (3) present results with caveats. Four sub-skills: A — Co-movement Discovery: build dynamic peer universe (15-30 candidates) using yf.screen() + yf.EquityQuery (same-industry stocks, broaden to sector, add thematic/adjacent industries), compute daily log returns, Pearson correlation, rank by absolute correlation, present top 10 + notable negative correlations; B — Return Correlation: pairwise analysis with Pearson correlation, beta (cov/var), R-squared, 60-day rolling correlation (mean/std/min/max), spread Z-score for mean-reversion, interpretation guide (>0.80 strong, 0.50-0.80 moderate, <0.50 weak, spread Z > |2| unusual divergence); C — Sector Clustering: NxN correlation matrix, hierarchical clustering via scipy (Ward linkage, falls back to sorting if scipy unavailable), identify clusters/outliers/strongest-weakest pairs; D — Realized Correlation: rolling windows (20/60/120-day), regime-conditional correlation (all days, up days, down days, high vol top 25%, low vol bottom 25%, large drawdown < -2%), highlight correlation increases during sell-offs. Defaults: 1y lookback, daily interval, Pearson method, 0.60 min threshold, top 10 results, 60-day rolling window. Includes reference file for dynamic peer universe construction using yfinance Screener API. Uses yfinance (required), pandas, numpy, scipy (optional). Python 3.8+. Works on all platforms.
- Snapshot quality
- 88/100
- Snapshot risk
- Medium
- Audit conclusion
- Needs review
Discovery
What this Skill helps an agent do.
Search metadata is limited to this summary, the controlled finance taxonomy, and relation labels. Detailed upstream instructions are not part of the Search Index.
Domains and assets
Search aliases and tags
Trust
Evidence from the captured directory.
This content snapshot assessment does not certify the repository, current files, or installation environment. "Not verified" means the captured files did not support a Yes or No conclusion.
License
GitHub reports the repository license as MIT License.
Review state
- Automated review
- Automated review
- Install tested
- No
- Human reviewed
- Not verified
Snapshot
- Files reviewed
- 3
- Captured
- 2026-07-29 07:31 UTC
- Snapshot ID
- fsh-stock-correlation-2026-07-29-001
Permissions
FilesystemRead
NoThe skill does not read local files. It fetches all data via yfinance.
FilesystemWrite
NoThe skill does not write local files. Output is presented as tables and analysis.
NetworkAccess
Yesyfinance fetches historical price data from Yahoo Finance. The skill also uses yf.screen() and yf.EquityQuery for peer universe construction.
ShellExecution
YesThe skill executes Python code for data analysis and may run pip install for dependencies. Step 1 checks and installs yfinance/pandas/numpy if missing.
CodeExecution
YesThe skill executes Python code for correlation computation, clustering, and regime analysis using yfinance, pandas, numpy, and optionally scipy.
ExternalCredentials
NoNo external credentials are required — yfinance uses public Yahoo Finance APIs.
Dependencies
yfinance
python3 -m pip install yfinance (auto-installed if missing)
Python library for Yahoo Finance market data. Auto-installed if missing.
pandas
python3 -m pip install pandas (auto-installed if missing)
Data manipulation library. Auto-installed if missing.
numpy
python3 -m pip install numpy (auto-installed if missing)
Numerical computing library. Auto-installed if missing.
scipy
python3 -m pip install scipy (optional, for hierarchical clustering)
Optional library for hierarchical clustering. Falls back to sorting if unavailable.
Data sources named by the Skill
Yahoo Finance (yfinance)
Historical prices, company info, and screener API for peer universe construction.
Snapshot assessment
88/100
Pineify Finance Skill snapshot assessment, version 1.0.0. Generated 2026-07-29 07:31 UTC.
Medium risk · Needs review
Skill structure
100/100Instruction clarity
100/100Dependency transparency
65/100Permission transparency
75/100Safety guardrails
100/100Finance task fit
100/100Audit findings
Medium
Auto-installs Python packages via pip
Step 1 checks for yfinance/pandas/numpy and auto-installs them via subprocess.check_call([sys.executable, "-m", "pip", "install", ...]) if missing. This executes pip install without user confirmation, which may be unexpected in some environments.
Medium
Dependency manifest is absent from the snapshot
No requirements.txt or pyproject.toml is included. Dependencies (yfinance, pandas, numpy, scipy) are auto-installed via pip in Step 1 and documented in README.
Sources and relations
Context around this Skill.
Repository
himself65/finance-skills
topic
Stock correlation & co-movement analysis
P0 relation label. No public page yet.
topic
Pair trading & spread analysis
P0 relation label. No public page yet.
topic
Sector clustering & peer grouping
P0 relation label. No public page yet.
topic
Regime-conditional correlation
P0 relation label. No public page yet.
agent
Claude Code
P0 relation label. No public page yet.
collection
Market analysis
P0 relation label. No public page yet.
guide
Reviewing finance skills before install
P0 relation label. No public page yet.
Registry
Read this record as data.
The public record includes the page-safe snapshot, evidence, assessment, taxonomy, and relations. Internal revision fields stay outside the public projection.
- Record ID
- github:himself65/finance-skills:plugins/market-analysis/skills/stock-correlation
- Snapshot ID
- fsh-stock-correlation-2026-07-29-001