MMarketMath

How this app works

MarketMath is a fundamentals dashboard for the S&P 500 built on primary sources. There is no proprietary feed and no black box: this page documents exactly where every number comes from, what is computed and when, and where this tool ends and other tools do a better job.

Data sources

Three free, primary-ish sources; nothing scraped from other finance sites

SEC EDGAR (XBRL)

All fundamentals. Every US public company files structured financial data with the SEC; the companyfacts API exposes the full as-filed history. We pull up to 20 fiscal years per company from its 10-K filings — income statement, balance sheet, and cash-flow concepts.

Yahoo Finance charts

Prices only: the latest quote, 52-week range, and 20 years of monthly split-adjusted closes per ticker (plus SPY as the benchmark). Market cap is computed as price × latest SEC-reported share count, not taken from a vendor.

Wikipedia S&P 500 list

The coverage universe and GICS sector / sub-industry classification for each constituent, refreshed weekly. This also supplies the ticker→CIK mapping into EDGAR.

The pipeline

What happens offline, before you ever load a page

  1. 1Ingest: a scheduled job fetches each company's raw XBRL facts from SEC EDGAR. Raw facts are messy — the same concept is tagged differently across companies and eras (revenue alone uses 5 different tags), and each figure appears up to 3 times as filings restate prior years.
  2. 2Resolve: for every company, concept, and fiscal year, a fallback chain picks the right tag, keeps only true annual periods (330–380 days from 10-K filings), and prefers the SEC's canonical entry — yielding one clean row per fiscal year: revenue, margins inputs, cash flows, capex, dividends, buybacks, stock compensation, debt, equity, PP&E, share counts.
  3. 3Adjust: as-filed per-share history is not split-adjusted (Apple's 2011 EPS shows as $27.68). Share-count discontinuities >1.8× are detected and older years are back-adjusted so per-share trends are comparable.
  4. 4Derive: from those rows plus the current quote, ~40 metrics are computed and stored — CAGRs over 3/5/10/15 years, margins, cash returns on capital, valuation multiples and yields, reverse-DCF implied growth, sales efficiency, the 0–100 quality score, the Lynch-style classification, and 8 mechanical red-flag checks.
  5. 5Serve: pages read only the precomputed database. Nothing is fetched from external APIs at page-view time, which is why pages are fast and the site keeps working even if a source has an outage.
  6. 6Refresh: prices update on weekday evenings; fundamentals refresh on a weekly rotation (each company re-ingested within ~7 days, which is plenty — 10-Ks arrive once a year).

Interactive tools (reverse DCF sliders, compounding, enough number) compute in your browser from the same stored data — change an assumption and the math reruns instantly, with the formula stated on the page.

What makes it different

Deliberate design choices, and their costs

Primary-source only

Numbers come from what companies filed, not from a data vendor's adjustments. You can trace any figure to a 10-K (every company page links to its filings). The cost: no analyst estimates, no earnings calendar, no news.

Expectations-first valuation

Instead of pretending to know fair value, the headline question is inverted: what growth does today's price require, and is that plausible against the company's own record?

No black boxes

Every score, flag, and screener preset shows its rules and thresholds; the Learn section documents each formula, including the quality score's exact component weights.

Long horizon, small surface

Annual data over decades, ~40 metrics that matter, no real-time anything. Built for judging businesses, not trading stocks. The cost: no quarterly granularity or intraday data — by design.

Honest limitations

  • The seeded universe is the S&P 500; any other US SEC filer is ingested live the first time someone opens its page (a few seconds). Foreign issuers without SEC XBRL filings and ETFs aren't covered. The screener and sector pages stay scoped to the S&P 500.
  • Annual data only; the latest quarter isn't reflected until the next 10-K.
  • Banks and insurers: FCF, capex, gross margin and related metrics are structurally absent (shown as “—”), and cash-flow-based scores fit them poorly.
  • Split adjustment is inferred from share-count jumps — accurate to a few percent, not exact.
  • Prices are delayed and the market cap uses the latest reported share count, which lags by up to a quarter.

Best alternatives

Tools that do parts of this better, or cover what this site deliberately doesn't

MarketMath is an educational project. Nothing here is investment advice, and data can contain errors — verify anything important against the filings. Stack: Next.js on Vercel, Supabase (Postgres), scheduled ingestion jobs.