Skip to content
vp.Ven Petrov
WorkAI demoWritingResourcesResume / CVAboutAt a glance
← Projects & notes
Financial review labProject story · 6 min read

What contributed to an $86 million rise in operating income?

I built a financial-report explorer around a question I could check: how did seven income-statement movements add up to an $86 million increase? The same source now supports comparisons of sales, cash flow and reported versus core results.

Ven PetrovInteractive prototypeOpen project

Operating income rose from $3,530 million to $3,616 million. For a financial review, the next question is what contributed to that $86 million change. A total alone does not show which lines increased income, which reduced it, or whether the explanation adds up.

I used Codex to build an independent prototype around that question, using Novartis's reported Q4 2025 and Q4 2024 figures. Comparable quarters appear in the same statement, so I could check the inputs and every step of the reconciliation. This is new demonstration work from public material, not work I performed for Novartis.

The first result is a bridge of seven signed changes that adds up to the reported increase. I then expanded the same 54-page report into an explorer for sales, products, regions, cash flow, balance-sheet figures and the company's core adjustments.

Explore the full report, or start with the original quarterly bridge.

An expense reduction needs the right sign

Other expense moved from minus $659 million to minus $447 million. That is $212 million less expense, so its contribution to operating income is positive $212 million. Reading the signed change as an increase in expense would reverse the business meaning while keeping the subtraction correct.

I kept the expenses negative, as they appear in the statement. Each financial line has an identifier, both period values, its unit, sign and report reference. The source extract was manually reviewed; this version does not automatically extract tables from a PDF.

Before calculating, the Python pipeline checks that both quarters are present, the reporting basis and units agree, and the expected lines are unique and complete. That prevents an apparently reasonable bridge from being assembled out of different periods or measures.

Make the seven movements add up

The bridge uses changes in sales, other revenues, cost of goods sold, selling and administration, research and development, other income and other expense. Their signed contributions sum to $86 million, with a zero residual against the change in reported operating income.

I excluded the gross-profit subtotal. Adding it alongside sales and cost of goods sold would count the same movement twice. Choosing which rows belong in the calculation matters as much as subtracting their values.

The interface lets a reader highlight contributions that increase or reduce income, select a line, inspect both reported amounts and open its source page. A second view lists the normalized figures together.

The bridge explains how the displayed numbers reconcile. It does not establish why the underlying business changed. The brief therefore keeps calculated observations separate from the company's explanation, which has its own evidence reference. It also stays within reported IFRS actuals. Budget, forecast, constant-currency and core non-IFRS comparisons need different inputs.

Check a small brief before asking a model to write one

The original brief is assembled from checked calculations and a bounded set of relevant report summaries. It makes zero model requests and has no inference cost. That let me test the data and acceptance rules first.

Review exposed a problem with the initial narrative validator. It checked format, numbers and citation identifiers, yet could accept a sentence with no number that contradicted the facts. It could also accept an invented cause attached to a real citation. Those checks were too weak to treat as factual verification.

I narrowed the optional OpenRouter adapter. It is implemented but disabled, and may only select and order up to three exact approved statements derived from the facts and evidence. It rejects newly written prose. That original adapter has not been tested with live inference, so whether its selection adds value remains an open question.

I later built a separate agent and reviewer experiment to test tool selection and explanations with actual recorded model calls. Its results should not be confused with this calculated brief.

Show what a failed check means

The saved evaluation contains 22 deterministic cases. They check reconciliation and deliberately wrong signs, mismatched units, incomparable periods, missing or duplicated lines and incorrect totals. Brief checks enforce the exact approved-statement contract, rejecting unknown citations, invented metrics, unsupported quantities, a numberless contradiction and an invented cause attached to a real citation.

The interface shows expected and actual results. When a deliberately bad input is rejected, the test passes because the boundary worked. These cases test this fixture and its explicit rules. They do not establish general truth detection or measure an LLM's financial reasoning.

A sanitized trace records the calculation stages and the hash of the reviewed source extract. That hash identifies the normalized input, rather than the original PDF bytes.

Open up the report without losing the reference

After the quarterly bridge, I wanted to compare more of the report without repeatedly searching through its pages. I used Codex and specialist agents to review all 54 pages, then curated selected tables into the wider dataset. Reviewing every page does not mean extracting every cell; the source map distinguishes pages used for structured figures from those reviewed for context.

The explorer compares quarterly and full-year figures, product sales, regions and therapeutic areas. It follows cash from opening to closing balance, separates reported IFRS income from the company's core measure, and keeps the balance sheet tied to its year-end dates.

Those views need different rules. A cash movement is a flow over a period; a balance-sheet figure is a value on a date. The company's core measure is a reconciliation from IFRS results, not an interchangeable label for them.

Newer products expose another small but consequential choice. Some prior-year cells are blank. Replacing a blank with zero would create a growth comparison the report does not support, so I kept it unavailable. Exchange rates, share counts and earnings per share also keep their own units, rather than being forced into USD millions.

What happens when a reader refreshes

Python builds the financial views and checks their identities. FastAPI serves them to the React and TypeScript interface within this Next.js site. Refresh sends a request to the real Python service through the site's API. A labeled saved result keeps the same figures, charts and checks available when the service is unavailable.

The working result is a report explorer with calculations a reader can follow back to the source. Broader ingestion, automatic extraction, private financial data and forecasting remain outside this prototype. It is hosted for inspection; that does not establish readiness for an internal finance process.

See the source, request flow and exact calculation code. The walkthrough distinguishes manually transcribed data, software calculations and behavior that has not been tested with an LLM.

Project sources & checks
Public source report ↗

Novartis Q4 and full-year 2025 report. The consolidated income statement is on page 17; operating-performance commentary is on page 5. Data period: Q4 2025 versus Q4 2024, reported IFRS, USD million.

Interactive calculation ↗

Inspect the seven contributions, original figures, page references, validation cases and sanitized calculation trace.

Saved result ↗

The saved review contains the normalized source facts, zero-residual bridge, deterministic brief and 22 evaluation case results. It records zero model calls.

On this page
An expense reduction needs the right signMake the seven movements add upCheck a small brief before asking a model to write oneShow what a failed check meansOpen up the report without losing the referenceWhat happens when a reader refreshesSources & checks
PythonFastAPIReactTypeScriptFinancial analysis

Connected to this

All writing
Finance evidence desk · Project story

Can an AI reviewer improve a financial explanation?

Transfutur ERP · Experience

ERP for transport and logistics

Ven PetrovSoftware engineer · Barcelona
GitHub ↗LinkedIn ↗Email ↗

Find a project or a note

18 results

Transfutur ERP · ExperienceERP for transport and logisticsAs the sole engineer, I built an ERP from zero for transport and logistics. It supported roughly €5–6 million in annual invoicing across two offices, and I kept it running for about a year.Finance evidence desk · Project storyCan an AI reviewer improve a financial explanation?A finance review needs the right explanation as well as the right numbers. I tested one AI analyst, an added reviewer and self-review on the same public report. The added review produced fewer supported answers.Financial review lab · Project storyWhat contributed to an $86 million rise in operating income?I built a financial-report explorer around a question I could check: how did seven income-statement movements add up to an $86 million increase? The same source now supports comparisons of sales, cash flow and reported versus core results.MNQ time-series research · ExperimentA time-series model that failed on later dataA model gained about $2,351 in the research simulation, then lost about $1,728 in three later windows. I followed the experiment from data acquisition and time intervals to costs, evaluation and the decision to reject it for trading.Crude-oil narrative tracker · Project storyFollowing crude-oil news without losing the market numbersI used a short personal experiment to follow global events alongside crude-oil prices and position values. The prototype calculates the numbers before asking Claude Code for an assessment and keeps a limited recent history.NQ/MNQ backtest engine · Technical noteYesterday’s short was blocking today’s trades in the simulatorWhen input stopped before the scheduled close, the strategy forgot a position but a shared counter kept counting it. Closing the old position before resetting the day restored the trade record and released the block.Small-cap edge research · Project storyWhat would make a small-cap price pattern worth testing?I built a Python and DuckDB prototype to turn trading ideas into named tests, compare their costs and revisit them in later periods. The candidates deteriorated under further checks, and the source exposed a misleading pass flag.Gadgeon Europe applications · ExperienceConnected-device dashboards and mobile apps at Gadgeon EuropeThe dashboards let people monitor energy use and control connected devices through data from several APIs. My work covered customized Ionic and Angular apps, integrations, store releases and maintenance.ctxforge · Project storyctxforge: turn “add search” into a task an agent can build“Add search” leaves decisions about data, matching and behavior unanswered. I built an editable toolkit that asks an LLM to uncover those requirements and show its assumptions before a coding agent starts.Sociedades Inactivas enquiries · Technical noteAn enquiry should survive a failed emailA failed notification should not make someone submit the same enquiry twice. The implemented form keeps the saved request and its reference while email delivery is retried; live activation is still pending.Astro local-services website · Project storyKeeping local service pages and their FAQs consistentA city page should only offer services enabled for that location. I used shared Astro templates with explicit availability rules, and one FAQ selection for both the visible page and its structured data.3D Spaces website migration · Project storyMoving 3D Spaces without moving its mailboxThe website could move to Next.js and Vercel, while email still depended on the old host. I carried over the pages, enquiry flow and analytics, then checked what the cutover had actually preserved.Capture CRM · Project storySave the listing now, connect the person when the details arriveA classified listing may arrive before its phone number or contact name. Capture CRM keeps those records separate, then lets a later capture complete the existing listing and bring contact status back to the browsing page.Product-description comparison bench · ExperimentWhere did the product description get that detail wrong?A product description can go wrong when the image is read or when the copy is written. This local bench exposes both steps, lets me switch models and records request measurements. A matched quality comparison is still unfinished.Between Us · Project storyBetween Us: keeping control of a generated filmA more emotional dialogue take still needed convincing acting and framing. I kept the alternatives, widened shots to reveal gestures and changed the workflow when its studio limited the films I wanted to make.Restaurant-service voice agent · ExperimentDesigning a restaurant-service call around the real offerThe first correction was the offer: a paid service had become a free visit in one draft. I then compared how the Spanish voice-agent prompts handled new speakers, technical limits and booking results.Vapi and Telnyx voice integration · Technical noteThe Vapi agent could speak, but it could not hear me clearlyI could hear the assistant, but it could not understand my distorted audio. Three codec tests changed the connection behavior and brought the greeting back; the caller-audio problem remains unresolved.Warloop: Echoes of Solmara · Project storyWarloop: turning generated character art into a playable prototypeGood-looking character images became tiny figures, a backwards walk and misplaced bosses in the game. I worked through the gap between generated art and playable behavior.
esc to close · Tab to move through results