System overview
How it works
Ingestion
Route handlers pull EDGAR company facts (every XBRL fact a company has filed), the submissions index for filing history, and raw Form 4 XML for insider trades. Yahoo supplies adjusted daily prices on the S&P 500 calendar, the company profile, analyst estimates and earnings surprises. FRED and the Treasury provide rates and macro series. Every upstream call has retries and a timeout, and a failure in one optional source (news, insiders) never blocks the page.
Processing pipeline
XBRL facts arrive as a flat list of values with start and end dates. The pipeline keeps 10-K and 10-Q facts, takes the latest filing for each period, turns year-to-date figures into discrete quarters by differencing, and builds trailing-twelve-month totals from the last four quarters. Concept fallbacks cover the different tags companies use for the same line item, and predecessor filers (for example XOM's pre-merger CIK) are merged. The output is a normalized income statement, balance sheet and cash flow statement.
Caching
Three layers keep the app free to run. Vercel's CDN caches each API response (company data for six hours, macro data for twelve) and serves stale copies while it revalidates. Inside a warm serverless instance, a promise cache deduplicates concurrent requests for the same ticker. The 42-company universe behind the home page and screener is a static JSON file built ahead of time, so the busiest pages never touch an upstream API.
Valuation engine
All modeling runs in the browser. Defaults (growth, margins, reinvestment, cost of capital) are derived from the company's own history and CAPM with the live 10-year Treasury yield, then every assumption can be edited. Industrial companies use a free-cash-flow-to-firm DCF with a Gordon terminal value; banks and insurers use a residual-income model on book value. Results are cross-checked against peer multiples and analyst targets, and a six-factor rating combines value, quality, growth, momentum, balance sheet and estimate revisions.
Design constraints
| Constraint | Decision |
|---|---|
| Free to host | Vercel hobby tier and GitHub only. Serverless functions stay under the 60-second limit by fetching in parallel and caching aggressively. |
| No paid data | SEC, FRED, Treasury and Federal Reserve data are public. Yahoo Finance endpoints are free but unofficial, so every Yahoo field is optional. |
| No AI dependency | Commentary comes from deterministic templates, so every conclusion can be traced to a number on the page and the app works with no API keys beyond FRED. |
| Any U.S. ticker | Nothing is precomputed per company except the 42-name universe; any EDGAR filer with XBRL statements can be analyzed on demand. |