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.

Conservativeλ = 2.0
Volatility target
<12%

Minimize variance with drawdown penalty. Prioritizes capital preservation.

Moderateλ = 1.0
Volatility target
12-20%

Maximize Sharpe ratio. Balances return and risk.

Aggressiveλ = 0.3
Volatility target
>20% tolerated

Maximize return with variance tolerance. Allows higher volatility for upside potential.

Profile benchmarks

Each metric is evaluated against profile-specific target ranges:

MetricConservativeModerateAggressive
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.

Short-term (<1yr)
Primary focus:Recent trends

40% momentum, 40% volatility, 20% correlation

Medium-term (1-5yr)
Primary focus:Balanced

25% momentum, 45% volatility, 30% correlation

Long-term (>5yr)
Primary focus:Long-term stability

15% momentum, 35% volatility, 50% correlation

The 5-step pipeline

01
Setup

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.

02
Data & Metrics

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).

03
Stock Analysis

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.

04
Risk Assessment

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.

05
Synthesis

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.

CAGR(Ending value / Starting value)^(1/years) − 1

Compound annual growth rate over the analysis period.

Annualised Volatility√(w' Σ_annual w)

Portfolio standard deviation via the annualised variance-covariance matrix. < 12%: conservative, 12-20%: moderate, > 20%: aggressive.

Sharpe Ratio(return − 4.5%) / volatility

Risk-adjusted return. > 1.0: good, 0.5-1.0: acceptable, < 0.5: insufficient.

Sortino Ratio(return − 4.5%) / downside_dev

Downside risk-adjusted return. Only penalises negative volatility. > 1.0: good.

Max Drawdownmin(Pₜ / max(P) − 1)

Largest peak-to-trough decline over the analysis period.

Monthly VaR 95%VaR_daily × √21

Estimated monthly VaR from daily VaR.

CVaR 95% (daily tail)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.

SkewnessE[((R−μ)/σ)³]

Asymmetry of return distribution. > 0.5: positive (occasional big gains). < −0.5: negative (occasional big losses).

KurtosisE[((R−μ)/σ)⁴]

Tail heaviness (excess kurtosis). > 0: fat tails (more extreme events). < 0: light tails.

Effective N1 / Σ(wᵢ²)

Concentration index. < 3.0: concentrated portfolio.

Min-Variance Volatility√(w*' Σ w*)

Volatility theoretically achievable with minimum-variance rebalancing.

Min-Variance WeightsSLSQP optimisation

Allocation that minimises portfolio variance. Conservative reference.

Profile-Optimal WeightsSLSQP with λ by profile

Allocation optimised for investor profile. λ varies: conservative (2.0), moderate (1.0), aggressive (0.3).

Momentum(Pₜ / Pₜ₋ₙ) − 1

Price momentum over 20/60/120 days, averaged across all holdings. Positive = bullish trend. Weighted by time horizon.

Top CorrelationsPearson r on daily returns

Most 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:

RatingMeaning
In rangeWithin the profile's expected range — risk aligns with your risk budget.
Below rangeBelow the profile's minimum — portfolio may be underutilising its risk capacity.
Out of rangeExceeds 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:

RatingConditionMeaning
Excellent≥ 2.0Top-tier risk-adjusted performance.
Good≥ 1.0Solid risk-adjusted performance.
Fair≥ 0.5Acceptable, but room for improvement.
Poor< 0.5Insufficient return for the risk taken.

Advanced metric thresholds

Additional metrics follow their own rating thresholds:

AlphaStrong positive (>+5%), Positive (>+2%), Neutral (±2%), Negative (<−2%), Strong negative (<−5%)
BetaVery low (<0.3), Low (0.3–0.7), Moderate (0.7–0.9), Market-like (0.9–1.1), Aggressive (1.1–1.5), Very aggressive (>1.5)
Tracking errorLow (<2%), Moderate (2–5%), High (5–8%), Very high (>8%)
R-squaredLow (<0.3), Moderate (0.3–0.6), High (0.6–0.85), Very high (>0.85)
Win ratePoor (<40%), Fair (40–50%), Good (50–60%), Excellent (>60%)
Payoff ratioPoor (<1.0), Fair (1.0–1.5), Good (1.5–2.5), Excellent (>2.5)
Gain-to-pain ratioUnprofitable (<1.0), Fair (1.0–1.5), Good (1.5–3.0), Excellent (>3.0)
Tail ratioNegative bias (<0.8), Balanced (0.8–1.2), Positive bias (1.2–1.5), Strong positive bias (>1.5)
Ulcer indexLow (<5%), Moderate (5–10%), High (10–20%), Very high (>20%)
Recovery factorPoor (<1.0), Fair (1.0–2.0), Good (2.0–5.0), Excellent (>5.0)

Momentum direction

Portfolio momentum is classified into five directional bands:

DirectionConditionMeaning
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:

RatingConditionMeaning
Excellent≥ 10Risk is broadly spread across holdings.
Good≥ 6Well diversified portfolio.
Moderate≥ 3Moderate diversification — some concentration risk.
Concentrated< 3Heavily 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.