Finance AI · Portfolio project

AI Variance
Analysis Automator

Eliminates 2–4 hours of manual work per reporting cycle. Upload budget and actuals — get a complete variance table, material exception flags, and a GPT-4o board pack narrative in under 30 seconds.

2–4hrs
Saved per cycle
<30s
To full output
GPT-4o
AI model used
3×
Output formats

Month-end is still manual

Finance teams spend hours every cycle doing work that can be automated. This tool targets the most time-consuming part of variance reporting.

Manual commentary writing
Controllers manually read variance tables, identify the top movers, apply business context, and write prose commentary for every line — every single month.
What this tool does instead
Upload two CSVs. The pipeline calculates all variances, flags material exceptions, sends structured data to GPT-4o, and returns board-pack-ready prose in under 30 seconds.
AI prompt engineering
The GPT-4o prompt specifies tone, format, and only passes flagged variances — producing tight, accurate, professional commentary every time at low API cost.
Finance domain knowledge
Materiality thresholds mirror real controller judgement (>5% or >£5,000). The tool understands favourable vs adverse, cost centre structure, and board pack conventions.

Three-stage pipeline

Clean separation between data processing, AI generation, and output delivery — each module independently testable and replaceable.

01 / Data layer
Pandas engine
Ingests budget and actuals CSVs, melts wide-to-long format, merges on cost centre + category, calculates variances, flags material exceptions.
pandas openpyxl python
02 / AI layer
GPT-4o narrative
Passes only flagged variances to GPT-4o with a structured finance prompt. Temperature 0.3 for consistent professional tone. Returns three-paragraph management commentary.
openai api prompt eng. gpt-4o
03 / Output layer
Multi-format delivery
Exports formatted Excel workbook with conditional formatting, delivers commentary text, and surfaces everything via an interactive Streamlit web application.
streamlit excel openpyxl

What the AI writes

Given a variance table with flagged exceptions, GPT-4o produces commentary that reads exactly like a senior financial controller wrote it.

management_commentary_jan_jun_2024.txt — generated by GPT-4o
Auto-generated board pack narrative

The organisation delivered a favourable overall variance of £68,500 (+4.8%) against the half-year budget of £1.42m, reflecting stronger-than-anticipated revenue performance and the benefit of the Q2 headcount freeze across sales and support functions.


The most significant driver was Sales Revenue, which exceeded budget by £77,000 (+7.9%), consistent with North region outperformance. This was further supported by a favourable salary variance of £21,840 (+8.0%), directly attributable to the headcount freeze. Partially offsetting these gains, Marketing Advertising ran £13,700 over budget (−23.8%) due to the April campaign launch.


Looking ahead, the favourable revenue trend is expected to continue into Q3. Management should monitor the Operations Overhead line (−6.0% adverse) which has trended marginally adverse for three consecutive months and warrants review in the August reforecast.

What this project shows

Built to demonstrate the intersection of finance domain expertise and modern AI automation skills — the combination most in-demand for transformation roles.

Finance domain
Variance analysis · Management accounts · Materiality thresholds · Board pack conventions · Controller judgement
Python / data engineering
Pandas pipeline · CSV ingestion · Wide-to-long transformation · Aggregation · Conditional flagging logic
AI / prompt engineering
GPT-4o API integration · Structured prompt design · Temperature tuning · Output consistency at scale
Product / UI
Streamlit web app · File upload handling · Dynamic table rendering · Excel export with conditional formatting
Python 3.10
OpenAI GPT-4o
Pandas
Streamlit
Excel / openpyxl
GitHub Pages

See it in action

Open the interactive demo — sample data pre-loaded, no setup required.