Documents → structured data

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.

Results

Measured against baselines.

Extraction: 100 companies held out of training
MetricBase Qwen3-4BFine-tuned
Valid JSON97%100%
Field accuracy42.3%94.1%
All fields correct1%59%
Revenue / Net income25% / 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.

Financial risk: out-of-time test, non-financial companies
PredictTest positivesModel AUCAltman Z'' AUCRiskiest 10% catches
Bankruptcy filing within 12 months178 (1.1%)0.8680.79161% (Altman 29%)
Bankruptcy filing within 24 months322 (2.6%)0.8320.76746% (Altman 25%)
Healthy → distressed next year1,271 (11.5%)0.9130.67151% (Altman 34%)
Profitable → loss next year1,162 (16.2%)0.8220.59037% (Altman 25%)
Revenue down >20% next year1,573 (12.5%)0.7990.63335% (Altman 27%)

Gradient-boosted trees (LightGBM) trained on fiscal 2011 to 2018/19 and tested on 2021 to 2023/24.

Methodology

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.
Limitations

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.
Enterprise contact

Let's Build What's Next.

Tell us about your organization's technology challenges, existing data environment, and business objectives.