Valuation Factory

Agent-based fundamental equity valuation. Fetches financial data, normalizes accounting, generates scenarios, runs multi-method DCF, and produces an institutional-quality investment memo.

End-to-End Pipeline
INPUT Ticker + As-of Date 00 Scope Setup classify company type, select peers, lock policies PHASE 1 — DATA ACQUISITION 01 Sources 01.5 Research 02 Extract 02.7 Evidence 03 Audit Gate 04 Normalize PHASE 2 — SCENARIOS 05.5 WACC 06 Scenarios 06.5 Audit 06.7 Theta 07 Feasibility retry ×3 PHASE 3 — VALUATION (all deterministic) FCFF DCF FCFE/DDM Comps SoTP Triangulation PHASE 4 — REPORTING QC → Sensitivity Grid → Investment Memo → Audit valuation_memo.md model_card.json scenario_summary.json
Data connectors
Agent (LLM) call
Deterministic engine
Audit gate
Input / output
Agent + deterministic

Data & Evidence

Fetches from SEC EDGAR, yfinance, FRED, Finnhub, Visible Alpha. 6 parallel web research agents. Deterministic audit gate with 40+ checks. Normalizes accounting with agent-proposed adjustments.

Scenario Engine

Agent forecasts only primitive independent variables (cost line items, working capital days). Derived quantities (EBIT margin, NWC/Rev, WACC) computed deterministically. Exponential fade model.

Valuation & Report

4 methods run in parallel: FCFF DCF, FCFE/DDM, Comps, SoTP. Triangulated with configurable weights (DCF 40%, Comps 25%, SoTP 20%, FCFE 15%). Investment memo with sensitivity grid.

Core Design: Primitive / Derived Split

Agents forecast only independent variables (individual cost items as % of revenue, working capital in days). All derived quantities — EBIT margin, NWC/Revenue, WACC, diluted shares, DCF values — are computed by deterministic engines. This prevents inconsistent parameters and makes every number auditable.

Data Acquisition & Evidence Pipeline
STAGE 00 Scope Setup classify company type (11 categories) · select 3–12 peers · lock policy hashes STAGE 01 — SOURCE SNAPSHOT (deterministic) all connectors fire in parallel; SHA-256 every file; compute quality scores SEC EDGAR yfinance FRED Finnhub Visible Alpha Transcripts quality = completeness × 0.30 + consistency × 0.25 + freshness × 0.15 + accuracy × 0.30 RESEARCH LEVEL — retries up to 2× on evidence audit failure STAGE 01.5 Web Research 6 parallel agents search: fundamentals, industry, peers, macro, analysts, risks STAGE 02 Extract to Staging parse XBRL company_facts → canonical IS/BS/CF + 5yr history STAGE 02.5 Sector Baseline (deterministic) compute p25/p50/p75 peer multiples + capital structure stats STAGE 02.7 — EVIDENCE PROCESSING VA route: 4 or non-VA route: 6 agents credibility blend: 50% deterministic tier score + 50% agent confidence synthesis comps pkg segment pkg Evidence Audit FAIL → feedback → retry from 01.5 STAGE 03 — DATA AUDIT GATE 40+ deterministic checks: A=L+E, margins, cash flow reconciliation, completeness only CRITICAL failures block pipeline; warnings logged STAGE 04 — NORMALIZE & ADJUST agent proposes adjustments (one-time, lease, SBC, M&A, FX); engine applies them derives cost breakdown (COGS%, SGA%, R&D%) and working capital days as anchors STAGE 05 — Normalization Audit agent reviews adjustments for reasonableness Normalized Financials + Evidence Pack + WACC

Source Snapshot

Fires all data connectors in parallel. SHA-256 hashes every downloaded file. Computes quality scores weighted by completeness, consistency, freshness, and accuracy.

Evidence Processing

Web sources get deterministic tier-based credibility (sec.gov = tier 1 = 0.95). After agent processing, final score = 50% deterministic + 50% agent confidence. Comps and segment packages are validated before downstream use.

Data Audit Gate

40+ deterministic checks: balance sheet identity (A=L+E ±0.5%), income statement margins, cash flow reconciliation, cross-statement ratios, completeness of critical fields.

Scenario Engine: Primitive / Derived Architecture
STAGE 05.5 — WACC (deterministic) Ke = Rf + β × ERP + size premium Kd = (interest / debt) × (1 − tax) WACC = Ke(E/V) + Kd(D/V) β Blume-adjusted: 0.33 + 0.67 × βraw SCENARIO LEVEL — retries up to 3× on any stage failure STAGE 06 — SCENARIO FACTORY (agent, xhigh reasoning) Agent forecasts ONLY primitive independent variables Primitives (agent sets) Revenue growth: g₁, g∞, τg Costs as % rev: COGS, SGA, R&D CapEx intensity: c₁, c∞, τc WC days: AR, Inv, AP, τwc Tax rate, terminal growth Derived (engine computes) EBIT margin = 1 − COGS − SGA − R&D NWC/Rev = (AR + Inv − AP) / 365 WACC (from stage 05.5) Diluted shares (Treasury Stock) FCFF, DCF, equity value bear base bull STAGE 06.5 — SCENARIO AUDIT (agent, xhigh) deterministic pre-checks (ordering, spread, cost sum < 1.0) + agent review FAIL → retry from 06 STAGE 06.7 — THETA BUILDER (deterministic) derive complete ScenarioTheta from primitives inject WACC, compute diluted shares via iterative Treasury Stock Method STAGE 07 — SCENARIO FEASIBILITY WACC − g > 0, margins in bounds, internal consistency EXPONENTIAL FADE MODEL v(t) = v∞ + (v₁ − v∞) × exp(−(t−1) / τ) smooth decay from near-term (v₁) to terminal level (v∞) controlled by fade speed (τ) applied to every forecast driver: revenue growth, each cost line, CapEx intensity, D&A, working capital days v₁ v∞ 10-year forecast

Primitive Variables

Agent sets individual cost items (COGS%, SGA%, R&D%), CapEx intensity, working capital in days, revenue growth, tax rate. Each has near-term (v₁), terminal (v∞), and fade speed (τ) parameters.

Derived Quantities

EBIT margin = 1 − cost items. NWC/Revenue = (AR+Inv−AP)/365. WACC from CAPM. Diluted shares via iterative Treasury Stock Method. Agent never touches these.

Scenario Audit

Deterministic pre-checks (bear < base < bull ordering, min 3% growth spread, costs sum < 1.0). Then xhigh-reasoning agent reviews evidence alignment and narrative coherence. Failure restarts from Stage 06.

Valuation Engines & Final Reporting
Scenarios (bear / base / bull) VALUATION ENGINES — all deterministic, 08b/c/d run in parallel STAGE 08a — FCFF DCF (required) 10-year explicit forecast via exponential fade Revenue → EBIT → NOPAT → D&A → CapEx → ΔNWC → FCFF PV = FCFF × (1+WACC)^(−t+0.5) (mid-year convention) Terminal: Gordon Growth TV = FCFFₙ₊₁ / (WACC − g) Equity bridge: EV + non-op − net debt − preferred − minority Diluted shares: iterative Treasury Stock Method Control: TV < 90% of EV 08b FCFE / DDM discount at cost of equity (not WACC) 08c Comps peer multiples p25/p50/p75 08d SoTP value each segment at appropriate multiple deduct corporate overhead (multi-segment companies only) STAGE 08.5 — TRIANGULATION weighted average of all active methods per scenario FCFF DCF 40% Comps 25% SoTP 20% FCFE/DDM 15% confidence = max(0.1, 1.0 − CV × 1.5) where CV = dispersion / composite STAGE 09 — SCENARIO QC ordering check (bear ≤ base ≤ bull) · spread ratio (bull/bear < 5×) implied EV/Revenue reasonableness · 5×5 WACC × terminal-g sensitivity grid REPORT LEVEL — retries up to 2× on critical numerical issues STAGE 11 — FINAL REPORTING agent (xhigh) writes investment memo narrative Report Audit completeness, numerical consistency, methodology disclosure, evidence citations CRIT valuation_memo.md model_card.json scenario_summary.json market_comparison.json controls_report.json

FCFF DCF

10-year explicit forecast via exponential fade. Mid-year discounting. Gordon Growth terminal value. Equity bridge deducts net debt, preferred, and minority. Terminal ROIC diagnostic checks reinvestment rate.

Triangulation

Weighted average across all active methods. Weights renormalize when a method is unavailable (e.g., SoTP for non-diversified companies). Confidence scored by coefficient of variation.

Report Audit

Agent checks completeness, numerical consistency, methodology disclosure, risk coverage, and evidence citations. Only critical numerical inconsistencies trigger a retry; quality warnings are logged.