How StockView works
Analysis pipeline, data sources and metrics.
Overview
StockView uses a 5-step analysis pipeline with parallel data fetching. Each step performs a specific task: configuration, data collection, analysis, risk assessment, and final report synthesis.
Risk Profiles
The algorithm adapts to three investor profiles with different risk tolerances and optimization objectives.
Minimize variance with drawdown penalty. Prioritizes capital preservation.
Maximize Sharpe ratio. Balances return and risk.
Maximize return with variance tolerance. Allows higher volatility for upside potential.
Profile benchmarks
Each metric is evaluated against profile-specific target ranges:
| Metric | Conservative | Moderate | Aggressive |
|---|---|---|---|
| Annualised Volatility | < 12% | 12–20% | 20–35% |
| Max Drawdown | < 10% | 10–20% | 20–35% |
| CVaR 95% (monthly) | < 2% | 2–5% | 5–10% |
| VaR 95% (monthly) | < 1.5% | 1.5–4% | 4–8% |
Time Horizon Adaptation
The analysis period and metric weights adapt to your investment horizon.
40% momentum, 40% volatility, 20% correlation
25% momentum, 45% volatility, 30% correlation
15% momentum, 35% volatility, 50% correlation
The 5-step pipeline
Portfolio parameters
Parses positions and classifies them by region (US, EU, crypto, Asia/LATAM). Uses exchange suffixes and the asset_class field to identify markets.
Market data, news, portfolio metrics
Parallel execution: fetches market data for 4 regions, news sentiment, macro news, and computes portfolio metrics (CAGR, volatility, Sharpe, Sortino, drawdown, VaR/CVaR, skewness, kurtosis, effective-N, correlations, momentum, min-variance and profile-optimal weights). Period adapts to investment horizon (3mo/1y/3y).
Combined technical & fundamental signals
Unified LLM analysis for all regions: RSI, MACD, Bollinger Bands, moving averages, P/E, earnings growth, dividend yield, beta and analyst ratings.
Structured risk assessment
Evaluates each metric against the selected risk profile benchmarks. Risk metrics (volatility, drawdown, CVaR, VaR) are classified as in range, below range, or out of range relative to profile targets. Performance ratios (Sharpe, Sortino) receive a four-tier rating from Excellent to Poor. Additional evaluations include distribution shape (skewness/kurtosis), momentum direction, diversification (effective N), and top correlations. Returns a structured risk assessment with narrative interpretations and actionable recommendations.
Structured portfolio report
Compiles a structured report with portfolio snapshot, metrics, technical outlook, fundamental view, risk profile, and actionable recommendations.
Metrics used
Metrics shown in reports. Computed on historical daily data from Yahoo Finance. Period adapts to investment horizon: 3mo (short), 1y (medium), 3y (long). Advanced metrics are included when sufficient history and benchmark alignment are available.
(Ending value / Starting value)^(1/years) − 1Compound annual growth rate over the analysis period.
√(w' Σ_annual w)Portfolio standard deviation via the annualised variance-covariance matrix. < 12%: conservative, 12-20%: moderate, > 20%: aggressive.
(return − 4.5%) / volatilityRisk-adjusted return. > 1.0: good, 0.5-1.0: acceptable, < 0.5: insufficient.
(return − 4.5%) / downside_devDownside risk-adjusted return. Only penalises negative volatility. > 1.0: good.
min(Pₜ / max(P) − 1)Largest peak-to-trough decline over the analysis period.
VaR_daily × √21Estimated monthly VaR from daily VaR.
mean(losses | loss > VaR)Average loss in the worst 5% of daily observations (reported as a monthly-style risk indicator in the UI). More informative than VaR alone.
E[((R−μ)/σ)³]Asymmetry of return distribution. > 0.5: positive (occasional big gains). < −0.5: negative (occasional big losses).
E[((R−μ)/σ)⁴]Tail heaviness (excess kurtosis). > 0: fat tails (more extreme events). < 0: light tails.
1 / Σ(wᵢ²)Concentration index. < 3.0: concentrated portfolio.
√(w*' Σ w*)Volatility theoretically achievable with minimum-variance rebalancing.
SLSQP optimisationAllocation that minimises portfolio variance. Conservative reference.
SLSQP with λ by profileAllocation optimised for investor profile. λ varies: conservative (2.0), moderate (1.0), aggressive (0.3).
(Pₜ / Pₜ₋ₙ) − 1Price momentum over 20/60/120 days, averaged across all holdings. Positive = bullish trend. Weighted by time horizon.
Pearson r on daily returnsMost correlated pairs. |r| > 0.75: near-redundant positions.
Metrics Interpretation
Each metric is automatically evaluated against profile-specific benchmarks and assigned a rating. These ratings are translated into plain-English narratives that explain what each metric means for your portfolio.
Risk metric evaluation
Risk metrics (volatility, max drawdown, CVaR, VaR) are compared to your profile's target ranges and classified into one of three categories:
| Rating | Meaning |
|---|---|
| In range | Within the profile's expected range — risk aligns with your risk budget. |
| Below range | Below the profile's minimum — portfolio may be underutilising its risk capacity. |
| Out of range | Exceeds the profile's maximum — risk is higher than intended for your profile. |
Ratio ratings
Performance ratios (Sharpe, Sortino, Calmar, Information Ratio) use a four-tier system:
| Rating | Condition | Meaning |
|---|---|---|
| Excellent | ≥ 2.0 | Top-tier risk-adjusted performance. |
| Good | ≥ 1.0 | Solid risk-adjusted performance. |
| Fair | ≥ 0.5 | Acceptable, but room for improvement. |
| Poor | < 0.5 | Insufficient return for the risk taken. |
Advanced metric thresholds
Additional metrics follow their own rating thresholds:
Momentum direction
Portfolio momentum is classified into five directional bands:
| Direction | Condition | Meaning |
|---|---|---|
| Strong positive | > +5% | Clear uptrend across holdings. |
| Positive | +2% to +5% | Moderate upward trend. |
| Neutral | −2% to +2% | No clear directional bias. |
| Negative | −5% to −2% | Moderate downward drift. |
| Strong negative | < −5% | Clear downtrend across holdings. |
Diversification (Effective N)
The effective number of positions is classified based on concentration:
| Rating | Condition | Meaning |
|---|---|---|
| Excellent | ≥ 10 | Risk is broadly spread across holdings. |
| Good | ≥ 6 | Well diversified portfolio. |
| Moderate | ≥ 3 | Moderate diversification — some concentration risk. |
| Concentrated | < 3 | Heavily concentrated — elevated idiosyncratic risk. |
Data sources
Yahoo Finance
Live market data: quotes, OHLCV, P/E, beta, analyst ratings, dividend yield. ~15 min delay. No API key required.
Financial news
News headlines per symbol from Yahoo Finance.
Macro data
Via regional proxy ETFs (SPY, EZU, EEM, etc.).
Known limitations
- ·Prices are delayed ~15 minutes via Yahoo Finance.
- ·Monthly VaR uses √21 — real losses can exceed the estimate.
- ·Macro analysis uses ETF proxies, not dedicated economic data.
- ·Correlations on less than 252 days may be less stable.
- ·The pipeline runs once per submission, no real-time updates.