# Market Risk — Full LLM Context > Institutional-grade equity analysis for self-directed investors. 18 analytical methods, 19 visualisations, contextual education on every chart. $25/month or $150/year. ## Overview Market Risk is a probabilistic equity analysis platform built by Shane at 132 Engineering (https://www.132eng.dev). It runs 18 analytical methods on any publicly traded stock, produces 19 interactive visualisations, and explains every chart in plain language using the investor's actual numbers. All computation runs client-side in JavaScript. There are no black boxes — every model, every assumption, every calculation is transparent and viewable in source. The platform uses classical statistics (Monte Carlo simulation, discounted cash flow, factor regression, Value at Risk), not AI/ML predictions. Website: https://www.marketrisk.dev Parent: https://www.132eng.dev ## Core Value Proposition Market Risk sits between Bloomberg Terminal ($25,000/year, assumes expertise) and retail finance apps (Robinhood, Yahoo Finance — surface-level data, no probabilistic thinking). It provides: - **Probabilistic analysis, not point estimates.** Every valuation produces a distribution, not a single number. "There's a 50% chance this stock is worth between $130 and $175" is more honest than "this stock is worth $150." - **Transparent computation.** All 18 methods run in the browser. View source on everything. No proprietary algorithms hiding behind an API. - **Contextual education.** Click any chart to see two tabs: "Analysis Review" (what YOUR numbers mean for THIS stock) and "Background" (what the chart is, its history, how professionals use it). The tool teaches while it analyses. - **Sector-aware modelling.** Banks are valued differently from tech companies. REITs are valued differently from utilities. The platform automatically switches valuation models based on GICS sector classification. ## Target Market - Self-directed investors managing $200K–$2M in brokerage accounts - Small RIA advisors who need analytical tools without Bloomberg cost - Finance students learning quantitative methods through real data - Serious hobbyists who want to understand the math behind their investments ## Analytical Methods (18) ### Valuation (3 methods) 1. **Stochastic DCF** — 5,000 Monte Carlo simulations of a discounted cash flow model. Revenue growth, margins, discount rate, and terminal growth are drawn from probability distributions defined by sector templates. Produces a fair value distribution with P10, P25, median, P75, P90. 2. **Dividend Discount Model** — Automatically used for financials (GICS 40, anchored to tangible book value), utilities (GICS 55, regulated rate base growth), and REITs (GICS 60, NAV floor). Each variant handles the sector's unique economics. 3. **Sensitivity Analysis** — Varies each DCF input independently between low and high estimates. Tornado chart shows which assumption swings valuation the most. ### Probability (3 methods) 4. **Monte Carlo Simulation** — 5,000 Geometric Brownian Motion (GBM) price paths. Histogram of terminal prices, expected return, probability of profit, percentile ranges. Same mathematical framework as Black-Scholes options pricing. 5. **Fan Chart** — Historical prices connected to forward probability bands from Monte Carlo. Visual display of how uncertainty compounds over time. 6. **Scenario Tree** — Discrete probability-weighted event paths. Sector-specific events (FDA approval for healthcare, rate decisions for financials, antitrust for tech) with probability estimates and price impacts. ### Risk (7 methods) 7. **Value at Risk (VaR)** — Parametric VaR at 95% and 99% confidence levels. Answers: "What's the most I could lose at a given confidence level?" 8. **Conditional VaR (CVaR / Expected Shortfall)** — Average loss beyond VaR. Answers: "When losses exceed VaR, how bad is it on average?" Adopted by Basel Committee after 2008. 9. **Volatility Cone** — Current realised volatility vs historical percentile bands (P10, P25, P50, P75, P90) across multiple time windows (10-day through 120-day). Shows whether the stock is unusually calm or volatile relative to its own history. 10. **Stress Testing** — 5–7 sector-specific scenarios (market crash, rate shock, regulatory action, etc.) with per-factor impact decomposition and severity ratings. 11. **Maximum Drawdown** — Peak-to-trough decline timeline over the full price history. Depth, duration, and frequency of underwater periods. 12. **Mean Reversion Z-Score** — Current price deviation from 200-day simple moving average in standard deviations. Historical extreme count and signal classification (oversold/undervalued/fair/extended/overbought). 13. **Seasonality** — Average monthly returns with positive hit rates computed from the full price history. ### Factors (2 methods) 14. **Four-Factor Regression** — OLS regression of stock returns against market (S&P 500), interest rates (10Y Treasury), sector-specific index, and commodity/currency factor. Reports R², adjusted R², annualised alpha, and per-factor betas. 15. **Correlation Heatmap** — Pairwise Pearson correlation between the stock and its macro driving factors, with inter-factor concentration detection. ### Synthesis (3 methods) 16. **Verdict Engine** — Aggregates all methods into expected return, probability of profit, VaR, Sharpe ratio, and a composite risk score across 5 dimensions (market, operational, financial, regulatory, strategic). 17. **Horizon Dashboard** — Decision-metric gauges: expected return, probability of profit, risk-adjusted return, downside risk. 18. **Risk Metrics Summary** — Annualised volatility, Sharpe ratio, Sortino ratio, beta, maximum drawdown in a single consolidated bar chart. ## Visualisations (19) 1. Monte Carlo histogram 2. Volatility cone 3. VaR/CVaR waterfall 4. DCF fair value distribution 5. Sensitivity tornado 6. Factor regression betas 7. Stress test waterfall 8. Horizon dashboard gauges 9. Fan chart (price projection) 10. Drawdown timeline 11. Mean reversion Z-score 12. Seasonality monthly returns 13. Factor correlation heatmap 14. Scenario tree (probability-weighted paths) 15. Risk metrics summary bar 16. Portfolio sector exposure (doughnut) 17. Portfolio return distribution (histogram) 18. Portfolio correlation matrix (heatmap) 19. Efficient frontier (scatter) ## Chart Insight System Clicking any chart opens a full-width modal with two tabs: **Analysis Review** — Contextual interpretation using the investor's actual numbers. Examples: - Monte Carlo: "Out of 5,000 simulated paths, the median outcome is $172 — above the current price of $150. There is a 62% probability of profit." - VaR: "Your 95% VaR is -18.4%. On a $10,000 position, you risk losing $1,840 in the worst 5% of outcomes." - Correlation: "AAPL's strongest factor relationship is with SPY (correlation: +0.93). At 0.93, this is a strong dependency — SPY is a major driver." Every analysis function computes from actual data — z-scores from price arrays, monthly returns from date series, correlations from return vectors. No generic descriptions. **Background** — Educational content per chart type. Origin stories (Monte Carlo: Ulam and von Neumann at Los Alamos, 1940s; VaR: JP Morgan's RiskMetrics, 1990s), model assumptions and limitations, how professionals use the tool. 3–4 paragraphs, no jargon. ## Portfolio System Users can create portfolios, add analysed stocks with allocation weights, and run portfolio-level analysis: - **Correlation matrix** — Pearson correlation on log returns between all holdings - **Portfolio volatility** — Full covariance calculation: σ_p = √(w'Σw) - **Diversification ratio** — Weighted average individual vol ÷ portfolio vol - **Portfolio VaR** — Parametric + historical (empirical 5th percentile) - **Correlated Monte Carlo** — Cholesky decomposition preserves correlation structure across holdings. 3,000 simulations. - **Stress tests** — Portfolio-level impact with per-stock contribution breakdown - **Efficient frontier** — 500 random portfolios plotted as return vs volatility. Current allocation marked. - **Sector exposure** — Weight distribution by GICS sector ## Sector Templates (11 GICS sectors) Each sector has customised valuation models, factor regression tickers, stress test scenarios, scenario tree events, and DCF input distributions: | Sector | GICS Code | Valuation Model | Notes | |--------|-----------|-----------------|-------| | Technology | 45 | Corporate DCF (WACC 10.0%) | Wide growth distributions | | Healthcare | 35 | Corporate DCF (WACC 10.0%) | FDA event scenarios | | Financials | 40 | DDM (tangible book anchor) | Deposits ≠ debt | | Energy | 10 | Corporate DCF (WACC 10.0%) | Commodity factor regression | | Utilities | 55 | DDM (regulated rate base) | Low-vol, yield focus | | Real Estate | 60 | DDM (NAV floor) | FFO-based, NAV as floor | | Industrials | 20 | Corporate DCF (WACC 9.5%) | Cycle-sensitive scenarios | | Discretionary | 25 | Corporate DCF (WACC 10.0%) | Consumer spending factors | | Staples | 30 | Corporate DCF (WACC 8.0%) | Defensive, low discount rate | | Materials | 15 | Corporate DCF (WACC 10.0%) | Commodity correlation | | Comm Services | 50 | Corporate DCF (WACC 10.0%) | Regulatory scenarios | ## Technical Architecture - **Frontend:** Alpine.js, EJS templates, Plotly (charts), Chart.js (portfolio charts) - **Backend:** Node.js, Express - **Database:** Supabase (PostgreSQL with Row Level Security) - **Data Sources:** Financial Modeling Prep (FMP) for stock data, FRED for macro factors - **Compute:** 100% client-side JavaScript. No server-side computation. - **Auth:** Supabase Auth with JWT cookies 30 API endpoints. 6 database tables with RLS. ~15,300 lines of code across 55 files. ## Pricing - $25/month - $150/year (50% annual discount) - Framing: Less than one financial advisor consultation ($150–$400/hour for opinions) vs $150/year for math on demand ## Comparison to Alternatives | Feature | Market Risk | Bloomberg | Robinhood | Koyfin | Simply Wall St | |---------|-------------|-----------|-----------|--------|----------------| | Monte Carlo simulation | ✓ 5,000 paths | ✓ | ✗ | ✗ | ✗ | | Stochastic DCF | ✓ Distribution | ✓ | ✗ | ✗ | Single-point | | Sector-aware models | ✓ 11 sectors | ✓ | ✗ | ✗ | Partial | | Portfolio Cholesky MC | ✓ | ✓ | ✗ | ✗ | ✗ | | Educational overlays | ✓ Contextual | ✗ | ✗ | ✗ | Infographics | | Transparent computation | ✓ Client-side JS | ✗ Proprietary | ✗ | ✗ | ✗ | | Price | $25/mo | $25K/yr | Free | $25–$50/mo | $10–$30/mo | ## About the Builder Shane — solo builder at 132 Engineering. 12 products shipped in 11 months including drone control systems, 100+ agent orchestration (Aagentix), engineering scoping tools (Forged Scope), and trading infrastructure (Holodeck). Market Risk was built in 4 days. Background in engineering and financial risk management. https://www.132eng.dev