Overview Methodology Performance Peer Analysis Valuations
Equity Research & Quantitative Finance

Automated Equity Research
& Valuation Platform

An end-to-end machine-learning pipeline that ingests SEC EDGAR financials for 80 large-cap companies, engineers 22 financial features, and trains an XGBoost + LightGBM ensemble validated with walk-forward validation. Valuation outputs include company-specific WACC via CAPM, 5-year DCF projections, and 5,000-iteration Monte Carlo simulations, all compiled into per-stock analysis for AAPL, MSFT, GOOGL, META, NVDA, and AMZN.

80-company training universe 22 engineered features XGBoost + LightGBM ensemble Walk-forward validation 5,000 Monte Carlo iterations SHAP explanations
PythonXGBoost LightGBMSHAP SEC EDGAR APIyfinance scikit-learnopenpyxl Monte CarloDCF / CAPM
Architecture

Pipeline & Methodology

80
Training companies (S&P 500 universe)
22
Engineered financial features
5K
Monte Carlo iterations per stock
6
Large-cap stocks valued
Step 01: Data
SEC EDGAR + yfinance Ingestion
Annual income statements, balance sheets, and cash flow statements fetched via yfinance (primary) with automatic fallback to the SEC EDGAR XBRL API when yfinance returns empty data. Market data (beta, P/E, EV/EBITDA, sector) sourced from yfinance info. 80 companies ingested; each returning 4–6 years of annual data.
Step 02: Features
22-Feature Financial Engineering
Features span revenue momentum (YoY growth, 1-year lag, 3-year CAGR), profitability levels and trends (gross, EBITDA, net margins + trend direction), cash generation (FCF margin + lag), returns (ROE, ROA, ROIC), balance sheet (D/E, current ratio), investment intensity (CapEx, R&D), valuation multiples, and sector encoding. Lag and trend features capture momentum, the single largest driver of model improvement.
Step 03: Models
XGBoost + LightGBM Ensemble
Two regression targets: forward 1-year revenue growth and forward 1-year FCF margin. Both XGBoost (depth-3, high regularization) and LightGBM (15 leaves) are trained; predictions are blended 50/50. Validated with walk-forward validation: train on all years before year t, test on year t, ensuring zero future leakage. Baseline models (persistence + historical mean) provide comparison benchmarks.
Step 04: Valuation
WACC · DCF · Gordon Growth
WACC computed per-company via CAPM (Ke = Rf + β × ERP) with market-implied cost of debt. Revenue and FCF margin projections use model predictions with geometric decay toward long-run rates. Terminal value via Gordon Growth Model. DCF intrinsic value compared to current price to generate BUY / HOLD / SELL ratings.
Step 05: Risk
Monte Carlo Simulation
5,000 iterations bootstrapped from walk-forward OOF residuals (not in-sample residuals) to get honest noise estimates. Each iteration perturbs revenue growth, FCF margin, and WACC, re-runs the full DCF, and records the intrinsic value. Output is a full probability distribution over fair value, quantifying upside/downside risk beyond the point estimate.
Step 06: Explain
SHAP Waterfall Explanations
SHAP TreeExplainer decomposes each prediction into per-feature contributions, making the model fully interpretable. Beeswarm plots show global feature importance across the training set; waterfall plots explain each individual stock prediction: which specific financial characteristics are driving the revenue growth and FCF margin forecasts up or down.
Walk-Forward Validation
Unlike k-fold or group-k-fold, walk-forward is the only CV scheme that respects chronological ordering. The model is never allowed to train on future data when predicting the past, mirroring exactly how the model would be deployed in production.
Persistence Baseline
The persistence model predicts next year = this year, a surprisingly hard benchmark in finance. Beating persistence on revenue growth is the minimum bar. Beating it on FCF margin requires capturing genuine mean-reversion and company-specific dynamics the market hasn't priced.
Validation

Model Performance

Walk-Forward Validation Performance
Revenue Growth Model
SHAP Beeswarm: Revenue Growth
FCF Margin Model
SHAP Beeswarm: FCF Margin
Feature Importance
Cross-Stock

Peer Comparison

Side-by-side view of DCF upside/downside, WACC, predicted revenue growth, and predicted FCF margin across all six target stocks. Bar colors reflect the BUY / HOLD / SELL rating generated by the model.

Peer Comparison
Individual Coverage

Per-Stock Analysis

Each stock includes a 5-year historical + projection view, DCF bridge waterfall, Monte Carlo fair-value distribution, WACC sensitivity heatmap, and SHAP waterfall explanations for both the revenue growth and FCF margin predictions.

AAPL Apple Inc.
Historical + Projection: AAPL
DCF Bridge: AAPL
DCF Bridge AAPL
Monte Carlo Distribution (5,000 trials): AAPL
Monte Carlo AAPL
WACC × Terminal Growth Sensitivity: AAPL
Sensitivity AAPL
SHAP Waterfall: Revenue Growth (AAPL)
SHAP Revenue AAPL
SHAP Waterfall: FCF Margin (AAPL)
SHAP FCF AAPL
MSFT Microsoft Corp.
Historical + Projection: MSFT
DCF Bridge: MSFT
DCF Bridge MSFT
Monte Carlo Distribution (5,000 trials): MSFT
Monte Carlo MSFT
WACC × Terminal Growth Sensitivity: MSFT
Sensitivity MSFT
SHAP Waterfall: Revenue Growth (MSFT)
SHAP Revenue MSFT
SHAP Waterfall: FCF Margin (MSFT)
SHAP FCF MSFT
GOOGL Alphabet Inc.
Historical + Projection: GOOGL
DCF Bridge: GOOGL
DCF Bridge GOOGL
Monte Carlo Distribution (5,000 trials): GOOGL
Monte Carlo GOOGL
WACC × Terminal Growth Sensitivity: GOOGL
Sensitivity GOOGL
SHAP Waterfall: Revenue Growth (GOOGL)
SHAP Revenue GOOGL
SHAP Waterfall: FCF Margin (GOOGL)
SHAP FCF GOOGL
META Meta Platforms
Historical + Projection: META
DCF Bridge: META
DCF Bridge META
Monte Carlo Distribution (5,000 trials): META
Monte Carlo META
WACC × Terminal Growth Sensitivity: META
Sensitivity META
SHAP Waterfall: Revenue Growth (META)
SHAP Revenue META
SHAP Waterfall: FCF Margin (META)
SHAP FCF META
NVDA NVIDIA Corp.
Historical + Projection: NVDA
DCF Bridge: NVDA
DCF Bridge NVDA
Monte Carlo Distribution (5,000 trials): NVDA
Monte Carlo NVDA
WACC × Terminal Growth Sensitivity: NVDA
Sensitivity NVDA
SHAP Waterfall: Revenue Growth (NVDA)
SHAP Revenue NVDA
SHAP Waterfall: FCF Margin (NVDA)
SHAP FCF NVDA
AMZN Amazon.com Inc.
Historical + Projection: AMZN
DCF Bridge: AMZN
DCF Bridge AMZN
Monte Carlo Distribution (5,000 trials): AMZN
Monte Carlo AMZN
WACC × Terminal Growth Sensitivity: AMZN
Sensitivity AMZN
SHAP Waterfall: Revenue Growth (AMZN)
SHAP Revenue AMZN
SHAP Waterfall: FCF Margin (AMZN)
SHAP FCF AMZN