← All work
Finance & Risk2026 / 07

Earnings Quality Autopsy

A forensic SEC/XBRL research platform that traces management claims through normalized fundamentals, source evidence, and documented tensions.

PythonFastAPISEC/XBRLNext.js
Source & deliverables
187backend tests
14FastAPI routes
9forensic modules
5export formats
01 / Context

The question
behind the work.

Most earnings tools either summarize management commentary or calculate ratios. They rarely connect a specific claim to the accounting evidence that should support it, preserve the source trail, and show where the evidence is incomplete or contradictory.

My role

I designed and built the complete research system: SEC ingestion, XBRL normalization, forensic modules, claim-testing logic, FastAPI backend, Next.js review interface, production runner, validation gates, and analyst handoff files.

02 / Implementation

What I built.

The system turns a filing cycle into quarterly models, claim-specific evidence ledgers, nine forensic reviews, and analyst-ready dossiers that preserve every source and derivation.

  • Normalized issuer-specific SEC companyfacts into quarterly income statement, balance sheet, cash-flow, trailing-twelve-month, and ratio models with filing provenance.
  • Built nine forensic modules covering cash conversion, working capital, revenue quality, margins, non-GAAP adjustments, segments, KPI continuity, language drift, and management claims.
  • Turned each claim into a structured evidence object with its source quote, required checks, supporting evidence, tensions, missing checks, verdict, confidence, and follow-up question.
  • Created a Next.js and TypeScript review interface for dossiers, evidence maps, segment analysis, source review, and production operations.
  • Produced portable JSON, Markdown, HTML, CSV, and Excel outputs from the same validated research run.
03 / In detail

From earnings call to evidence trail

I built this around the work that happens after a company makes a polished earnings claim. The system ingests SEC filings and companyfacts, normalizes quarterly statements and trailing-twelve-month measures, and keeps the source and derivation path attached to each metric.

That gives the analyst a way to move from a management statement to the revenue, margin, cash conversion, working-capital, segment, or non-GAAP evidence that should support it. The point is to make the work reviewable instead of leaving the reasoning inside a spreadsheet or a summary paragraph.

A claim-by-claim research workflow

The research engine runs nine forensic modules across cash conversion, working capital, revenue quality, margins, non-GAAP adjustments, segments, KPI continuity, language drift, and management claims. Each claim becomes a structured object with the exact quote, required checks, supporting evidence, tension points, unresolved items, confidence, and follow-up question.

I built the review experience in Next.js and TypeScript so a user can work through dossiers, evidence maps, segment analysis, source review, and production runs in one place. The same run produces JSON, Markdown, HTML, CSV, and Excel outputs for a portfolio-manager handoff.

Built to be inspected

The project has 14 FastAPI routes and 187 backend tests covering completion, source links, artifacts, cache behavior, production checks, and PM review. The AAPL run creates a normalized financial model, evidence ledger, dossier, research note, and linked workpaper package from a single traceable workflow.

That structure matters because it keeps the research useful after the first read. A reviewer can follow the path from a narrative claim back to the filing evidence, the calculation, and the questions that still need an answer.

04 / Engineering judgment

The decisions
that shaped it.

  1. Kept the conclusion layer deterministic so a polished narrative cannot outrun the evidence attached to it.
  2. Preserved source and derivation lineage through every normalized metric instead of flattening SEC facts into unexplained ratios.
  3. Represented missing evidence as unresolved rather than treating unavailable disclosures as zero or quietly filling gaps.
  4. Structured every claim around support, tension, source links, and follow-up questions so the analyst can make the final investment judgment from the evidence.

Evaluation & results

The repository collects 187 backend tests, exposes 14 FastAPI routes, and runs finance-specific completion, PM review, source-link, cache, artifact, and production-readiness checks. The real AAPL workflow produces a normalized model, evidence ledger, dossier, research note, and linked workpaper package from one traceable run.

05 / Working outputs

See it for yourself.

Select an image to view it at full size.

06 / Artifacts

Take a closer look.

01AAPL earnings-quality dossier02PM research note03PM handoff workbook
Next projectWayline