Skip to content
Directory
GitHub Star
Evidence, tags & source code

From two financial filings to a chart someone can recompute ​

A colleague asks you to compare two years of profit for an afternoon presentation. The agent finds the PDFs and draws a rising line. Both numbers match the filings, but the first point is GAAP net income and the second is adjusted net income. The chart was drawn correctly. The mistake was connecting those two points.

In this exercise, make a chart that survives three questions: Where did those numbers come from? Why are the periods comparable? Could someone else use the retained evidence to get the same result?

Find a number, then keep its evidence ​

A search for “net income” is a good way to find candidate pages, not a reason to use the first number it returns. The same table can contain three-month and nine-month columns, and the unit declaration may be on the previous page. A search match is a pointer, not evidence. Keep the original file, the physical page, the cell or text item, and the surrounding context that identifies the period and unit. Use the page number in the PDF viewer rather than guessing from the printed page label.

If you cannot read the original, you can say a filing exists, but a search snippet should not stand in for its table. An image-only scan is another version of that problem: this exercise records why the number is missing, rather than substituting zero or claiming to have run OCR.

Check comparability before calculating growth ​

These observations are from two fictitious companies. All amounts are shown in USD millions.

Two observations for the same companyEarlierLaterWhat the report can say
Orion revenue, same basis1,0001,200Up 20%; connect the points
Orion GAAP compared with adjusted net income100150No common basis; leave growth blank
Orion adjusted net income, both periods120150Up 25% once the adjustment is traced
Lyra net income, later period missing60MissingKeep the earlier figure; do not invent a later point

Writing USD 1.2 billion as USD 1,200 million is a conversion. Turning 100 into 120 is not. The example retains the adjustment from the original disclosure so a reviewer can decide whether the adjusted comparison is appropriate. In a real report, if you cannot establish a common basis, leave the comparison blank rather than drawing a persuasive line.

Structured filings are a reasonable alternative. The SEC EDGAR APIs expose structured facts, a convenient starting point when they cover the data you need. This exercise works from PDFs because those are the supplied materials and the reviewer wants to see the original page behind the chart.

Run it locally and hand over more than a screenshot ​

From the Open ETF Agent v1.0.25 repository root, use its supported Node 26 version and install the locked dependencies. This demo uses the included synthetic filings; no model key is needed.

bash
work=$(mktemp -d)
node scripts/financial-report-demo.mjs "$work/demo"
node src/financial-report-cli.mjs trace --bundle "$work/demo/report" --id orion-adjusted-growth
node src/financial-report-cli.mjs verify --bundle "$work/demo/report"
node src/financial-report-cli.mjs recompute --bundle "$work/demo/report" --out "$work/recomputed"

Open "$work/demo/report/report.html". Start with the 25% adjusted gain and follow it to both operands. The earlier value of 120 leads back to the reported figure and its adjustment. Then find the GAAP-to-adjusted comparison: both disclosed values remain, but there is no growth rate. Finally, look at dataset.json for the metrics and comparisons shared by the prose and SVG charts. Do not copy rounded display values back in as calculation inputs.

verify checks that the saved bundle and its evidence still match. recompute regenerates from the frozen inputs without fetching the PDFs again. Neither determines whether you picked the correct accounting row. See the complete command and accounting-basis guide.

The next time you send a chart, include a path to the original, a clear comparison basis, and the underlying data. Recomputability means a reviewer can check the result without taking it on trust.

Engineering notes, evidence and boundaries. · Contact: hpoenixf@foxmail.com · WeChat: hpoenixf0510