How StockView works
Analysis pipeline, data sources and metrics.
Overview
StockView uses a 6-step sequential analysis pipeline. Each step performs a specific task: configuration, data collection, analysis, risk assessment, rebalancing, 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.
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 6-step pipeline
Portfolio parameters
Parses positions and classifies them by region (US, European, crypto equities). Uses exchange suffixes to identify markets.
Quotes, MPT metrics
Fetches historical prices from Yahoo Finance. Period adapts to investment horizon (3mo/1y/3y). Computes comprehensive metrics: return, volatility, Sharpe, Sortino, CVaR, skewness, kurtosis, momentum, EMA, and profile-optimized weights.
Technical & fundamental signals
Analyzes each position: RSI, MACD, Bollinger Bands, moving averages, P/E, earnings growth, dividend yield, beta and analyst ratings.
Risk profile
Evaluates concentration, high correlations, volatility and regional macro risks. Returns a score and LOW / MEDIUM / HIGH classification.
Suggested actions
Proposes REDUCE, INCREASE or MAINTAIN for each position. Uses both min-variance weights (conservative reference) and profile-optimal weights (adapts to investor risk tolerance).
Markdown report
Compiles the final report with metrics, technical and fundamental outlook, risk profile and action plan.
Metrics used
Computed on historical daily data from Yahoo Finance. Period adapts to investment horizon: 3mo (short), 1y (medium), 3y (long).
Σ(wᵢ × rᵢ) × 252Weighted average return over the analysis period, annualised.
√(w' Σ w) × √252Portfolio standard deviation via 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.
std(losses < 0)Volatility of only negative returns. Focuses on harmful volatility only.
5th percentile of returnsMaximum expected daily loss 95% of trading days.
VaR_daily × √21Estimated monthly VaR from daily VaR.
mean(losses | loss > VaR)Average loss on the worst 5% of days. 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. > 3: fat tails (more extreme events). < 3: 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. Positive = bullish trend. Weighted by time horizon.
EMAₜ = α×Pₜ + (1-α)×EMAₜ₋₁Smoothed price indicators for 20/50/200 day spans. Above price = bullish, below = bearish.
Pearson r on daily returnsMost correlated pairs. |r| > 0.75: near-redundant positions.
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.