Reading financial statements into structured data.
ONYX SEC AI Research
ONYX SEC AI fine-tunes a small open language model to read the income statement in a public SEC 10-K filing and return standard fields as JSON: revenue, cost of revenue, gross profit, operating income, pretax income, tax, net income, EPS, and weighted shares, in full units.
A companion model uses the same free SEC data to estimate next-year financial risk from book numbers alone, so it could also score private companies.
- 42% → 94%
- field accuracy on 100 held-out companies (base vs. fine-tuned Qwen3-4B)
- 100%
- valid JSON output, up from 97%
- $0.74
- training cost: 47 minutes on a single rented GPU
Method: LoRA fine-tuning of an open language model, scored on companies held out of training.
Measured against baselines.
| Metric | Base Qwen3-4B | Fine-tuned |
|---|---|---|
| Valid JSON | 97% | 100% |
| Field accuracy | 42.3% | 94.1% |
| All fields correct | 1% | 59% |
| Revenue / Net income | 25% / 9% | 91% / 88% |
Run 1, 2026-11-27: LoRA r16, one epoch on 1,803 training statements, about 47 minutes on one rented RTX 4090, $0.74.
| Predict | Test positives | Model AUC | Altman Z'' AUC | Riskiest 10% catches |
|---|---|---|---|---|
| Bankruptcy filing within 12 months | 178 (1.1%) | 0.868 | 0.791 | 61% (Altman 29%) |
| Bankruptcy filing within 24 months | 322 (2.6%) | 0.832 | 0.767 | 46% (Altman 25%) |
| Healthy → distressed next year | 1,271 (11.5%) | 0.913 | 0.671 | 51% (Altman 34%) |
| Profitable → loss next year | 1,162 (16.2%) | 0.822 | 0.590 | 37% (Altman 25%) |
| Revenue down >20% next year | 1,573 (12.5%) | 0.799 | 0.633 | 35% (Altman 27%) |
Gradient-boosted trees (LightGBM) trained on fiscal 2011 to 2018/19 and tested on 2021 to 2023/24.
How it was built and measured.
- Input
- The income statement page EDGAR renders for each 10-K, as plain text. Labels are company-specific and numbers are scaled ("$ in Millions"), so the model has to read, not copy.
- Labels without hand labeling
- Targets are the company's own XBRL values from the SEC Financial Statement Data Sets: current fiscal year, full year, no segments. An example is kept only if every target number appears on the page after undoing the scale; about 96% of filings pass.
- Split by company
- Companies are split 80/10/10 by a hash of their SEC identifier, so test companies are never seen in training.
- Metric
- Valid-JSON rate, per-field accuracy (amounts within 0.1%, nulls must be null), and the share of statements with every field correct, compared with the same model before fine-tuning.
- Error analysis
- Of the 77 wrong fields: 46 where the model returned a value but the label was null, 24 the reverse, 3 with the sign flipped, 4 with the wrong number, and none with the wrong scale. Most errors are about whether a line counts as a standard field, so mapping more XBRL tags should help more than a bigger model.
- Data
- SEC data is public-domain US government work. Requests identify the client and stay under the SEC's rate guidance.
Where the results stop.
- Income statements only; balance sheets and cash flow statements are not yet covered.
- Inputs are EDGAR's clean rendered statement pages, not the original 10-K HTML or PDF.
- One training run, evaluated on 100 held-out companies.
- The risk model uses book numbers only, without market prices, and is a research result, not a credit product.
- Research results. Not deployed in a commercial or customer system.
Let's Build What's Next.
Tell us about your organization's technology challenges, existing data environment, and business objectives.