- Home
- Skills
- Trading & Investing
- quantitative-stock-analyzer
More screenshots
Works with the AI tools you already use
Quantitative Stock Analyzer
You have a portfolio of 15 stocks and a hunch that your "diversified" portfolio is actually 90% exposed to the same...
Free
quantitative-stock-analyzer
Example session with this skill installed
"Analyze my portfolio — AAPL, MSFT, NVDA, TSLA, JPM — and optimize for max Sharpe"
- Read your context and instructions
- Compiled the quantitative-stock-analyzer
PORTFOLIO ANALYSIS: 5-STOCK UNIVERSE
════════════════════════════════════
FACTOR EXPOSURES (PER TICKER)
─────────────────────────────
Ticker Momentum Beta Vol Factor Sector
────── ──────── ──── ────────── ───────
AAPL 0.42 1.18 0.31 Tech
MSFT 0.38 1.05 0.45 Tech
NVDA 1.21 1.87 0.12 Tech
TSLA 0.87 2.14 0.08 Auto
JPM -0.12 1.02 0.52 Finance
PORTFOLIO OPTIMIZATION (MAX SHARPE)
───────────────────────────────────
Optimal Weights
AAPL: 18.2% | MSFT: 24.7% | NVDA: 8.3% | TSLA: 4.1% | JPM: 44.7%
Expected Return: 14.3% | Volatility: 11.8% | Sharpe: 1.02 (rf = 2%)
RISK METRICS (95% CONFIDENCE)
─────────────────────────────
VaR: -1.87% daily | CVaR: -2.64% | Max Drawdown: -18.3% | Sortino: 1.34
CORRELATION FLAGS
─────────────────
AAPL-MSFT: 0.72 (HIGH — consider reducing one)
JPM-others: avg 0.31 (good diversifier)
TOP 3 RECOMMENDATIONS
─────────────────────
- Reduce TSLA — high beta (2.14) with low vol factor = concentrated risk
- Increase JPM — n
Connects securely to your tools. The creator never sees your data.
About this skill
The Problem
You have a portfolio of 15 stocks and a hunch that your "diversified" portfolio is actually 90% exposed to the same momentum factor. You run pct_change().mean() and get a number. You don't know if your Sharpe ratio of 1.2 is good relative to the risk you're taking, whether your portfolio is concentrated in correlated positions, or which factor exposures are driving your returns. The analysis you need — factor decomposition, mean-variance optimization, correlation clustering — requires scipy, pandas, and numpy. Your agent can write the code, but without a structured framework it produces ad-hoc calculations with no validation, no confidence intervals, and no interpretation.
What You Get
- Calculate factor exposures — compute momentum (12-1 month), volatility (inverse 60-day), and beta (rolling 252-day vs SPY) factors for any stock universe, with per-ticker factor scores and time-series visualizations
- Optimize portfolio weights — run maximum Sharpe ratio optimization with scipy's SLSQP, with configurable constraints (min/max weight per asset, position count limits, sector caps) and efficient frontier generation
- Decompose risk comprehensively — calculate VaR (historical), CVaR (expected shortfall), maximum drawdown, Sharpe ratio, Sortino ratio, annualized volatility, and annualized return from return series with configurable confidence levels
- Analyze correlation structure — build correlation matrices, find pairs above threshold (>0.7), run hierarchical clustering with Ward linkage, and identify the least-correlated pairs for diversification
- Construct Fama-French style factor models — regress portfolio returns against market, size, value, momentum, and volatility factors to identify alpha sources and factor tilts
- Generate regime-aware signals — detect market states via rolling correlation regime changes and factor rotation patterns that indicate shifting market conditions
Why This Beats Prompting It Yourself
Asking an agent "calculate the Sharpe ratio for my portfolio" returns a single number without context: no time period, no risk-free rate justification, no comparison to benchmark, no confidence interval. This skill runs a structured pipeline: fetch data (yfinance), compute factors, build covariance matrix, optimize, decompose risk, and present results with interpretation. The difference between "your Sharpe is 1.2" and "your Sharpe is 1.2 over 3 years with 95% VaR of -2.3%, primarily driven by momentum factor exposure of 0.65, which is 2 standard deviations above the market average."
Example Session
You: "Analyze my portfolio — AAPL, MSFT, NVDA, TSLA, JPM — and optimize for max Sharpe"
Agent:
PORTFOLIO ANALYSIS: 5-STOCK UNIVERSE
════════════════════════════════════
FACTOR EXPOSURES (PER TICKER)
─────────────────────────────
Ticker Momentum Beta Vol Factor Sector
────── ──────── ──── ────────── ───────
AAPL 0.42 1.18 0.31 Tech
MSFT 0.38 1.05 0.45 Tech
NVDA 1.21 1.87 0.12 Tech
TSLA 0.87 2.14 0.08 Auto
JPM -0.12 1.02 0.52 Finance
PORTFOLIO OPTIMIZATION (MAX SHARPE)
───────────────────────────────────
Optimal Weights:
AAPL: 18.2% | MSFT: 24.7% | NVDA: 8.3% | TSLA: 4.1% | JPM: 44.7%
Expected Return: 14.3% | Volatility: 11.8% | Sharpe: 1.02 (rf = 2%)
RISK METRICS (95% CONFIDENCE)
─────────────────────────────
VaR: -1.87% daily | CVaR: -2.64% | Max Drawdown: -18.3% | Sortino: 1.34
CORRELATION FLAGS
─────────────────
AAPL-MSFT: 0.72 (HIGH — consider reducing one)
JPM-others: avg 0.31 (good diversifier)
TOP 3 RECOMMENDATIONS
─────────────────────
1. Reduce TSLA — high beta (2.14) with low vol factor = concentrated risk
2. Increase JPM — n
Use Cases
- Monthly portfolio review with factor exposure analysis and rebalancing recommendations
- Pre-trade optimization before large position changes
- Risk decomposition for investor presentations and compliance reports
- Correlation analysis to identify hidden concentration risk in "diversified" portfolios
- Factor rotation signals when market regime shifts (momentum → value rotation)
- Academic-style factor model construction for research and backtesting
Known Limitations
Factor calculations require sufficient historical data — portfolios with recent IPOs may have incomplete factor scores. Optimization results are backward-looking and assume past correlations persist. VaR calculations using historical simulation assume the future resembles the past. The skill uses yfinance data which may have delays for non-US markets. Risk metrics should be interpreted alongside fundamental analysis, not in isolation.
Upgrade to Pro
Free analyzes single tickers. Quantitative Stock Analyzer Pro ($5) optimizes portfolios: SLSQP optimization with constraints, factor risk decomposition, stress scenarios, and backtestable timing signals. Upgrade when the question is weights, not stocks — Pro version.
How to install
Works the same in every agent - Claude, Cursor, Codex, Copilot and 20+ more.
- 1
Download the ZIP
Free skills download straight away. Paid skills unlock right after purchase.
- 2
Unzip into your skills folder
Every agent reads skills from one folder on your machine. Drop the unzipped folder in there.
- 3
Ask your agent to use it
Restart the agent if it was already running. It picks the skill up automatically - no config needed.
Skills folder by agent
Click the path to copy it. Create the folder if it does not exist yet.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill passes our trust checks below.
Security scanned
Passed our 8-point scan before listing
14 installs
Downloaded by developers to date
Free forever
No account required to browse
Trust & safety
Security scanned
Verified clean 4 months ago
- Free to download with an account