Maria Kupa
All posts

2 November 2026 · 8 min read

How to apply AI to IFRS 9 monthly reporting

Part 1 of a series on how I use AI as a credit risk analyst.

My first AI project as a credit risk analyst started with a familiar month-end task: checking the IFRS 9 model output and understanding what had changed in exposure and expected credit loss (ECL) since the previous month-end. I'd never found time to automate the whole workflow in Python myself. I kept the calculations and checks in a script and gave AI a narrower job: drafting a short comment from the results.

I created a ‘skill’: a reusable set of written instructions telling the AI how to run the script and draft commentary from its results.

The task on the first business day after month-end

At month-end, I need to understand how exposure and expected credit loss (ECL) have changed since the previous month-end, both overall and by stage.

My data-quality review

First, I check the quality and completeness of the data:

  • Is the data load ready?
  • Are all relevant tables updated?
  • Are all expected products present?
  • Are any figures extreme or suspicious and in need of investigation?

Checks built into the script

The script also checks freshness, missing products and restatements, and reconciles the Excel output before saving it. The checks below show how it handles these issues.

  • Freshness: the portfolio table must have been rebuilt after month-end and contain rows for the report date. If not, nothing is saved; I get a ⚠ notification and the scheduled job retries on business day 2 and 3.
  • Missing products: a product can be missing from the output for many reasons. If it is, we are told right away: the file is still saved, and the notification shows which product is missing, last month's amounts and the last date it had data.
  • Restatements: the script re-reads last month's delivered file and compares it with what the database says today. If history has changed, we need to investigate further.
  • Excel output: the script writes the model output and comparisons to a temporary Excel file, reads it back and reconciles it against database totals. Only then does it save the final file to the configured folder.

Then I extract the figures, compare them with the previous month-end, prepare and save the Excel file, and write a short explanation of the movements.

The analysis needs attention, but it competes with other month-end deadlines. Extracting, checking and preparing the figures can take anything from 15 minutes to a few hours when the data needs extra checks or reloads. Errors can also go unnoticed until reconciliation.

Automate the calculations, not the analyst’s judgement

I started by separating three responsibilities: the script calculates and checks the figures, AI drafts a factual summary, and the analyst investigates and interprets the results. My colleagues and I look into extreme or suspicious figures to understand whether they reflect a data issue, a change in product setup or finance bookings.

StepNeeds judgement?Who does it
Extract exposure and ECL by product, currency and stageNoScript (SQL)
Check freshness and missing productsNoScript
Compare with the previous month-end and the last delivered fileNoScript
Write and reconcile the Excel fileNoScript
Select changes from the script’s summary and draft factual commentaryYes, within the skill’s rulesAI agent
Decide whether to override a failed checkYesHuman

The script does all the calculations and writes the results to a file called summary.json. That file holds everything the AI is allowed to know about the month:

  • Totals by product: exposure and ECL this month and last month, with the absolute and percentage changes.
  • Comparison by product, currency and stage: the same figures broken down by product, currency and stage, including rows that are new or have disappeared.
  • Notable changes: rows flagged by the script using fixed thresholds. In the shared demo, both conditions must be met: an absolute percentage change of at least 5% and an absolute amount change of at least 0.5% of the relevant currency total.
  • Data checks: when the data was refreshed, how many rows there are for the month-end, and which products are missing or new.
  • Restatements: values for the previous month-end that differ from the file we delivered last month.

GitHub Copilot acts as the AI agent: it follows the skill's instructions and runs the script's commands. I have scheduled this as an automation in Copilot, and my computer needs to be open for it to run.

During each run, Copilot:

  1. Starts the script that extracts, checks and compares the data and prepares the Excel output.
  2. Reads the script's status and the calculated results in summary.json.
  3. Writes 3–6 factual bullet points to comment.md, using only the summary.
  4. Invokes the script's notification command. The script combines the checks, AI commentary and a table by product and stage, then posts the message to Teams.

Because summary.json is saved, the notification can be rebuilt and resent later without repeating the data extraction or calculations. It also documents exactly what the comment was based on.

The script produces the numeric output. The skill instructs AI to draft commentary from summary.json without calculating new figures, querying the database directly or changing the numeric results. AI writes the comment to a separate file, which the script includes in the notification. Keeping these roles separate does not guarantee a correct interpretation: investigating causes and deciding what the results mean remain our responsibility.

Turning the workflow into instructions

I wrote SKILL.md as a runbook for the agent. Rather than simply asking it to analyse the output, I specified what to do when the data wasn't ready, which facts it could use and which actions required a human decision. The main rules were:

  • Respond to the outcome: When the output is ready, write the commentary and send the notification. If the data is not ready, report what is missing without bypassing the checks. If the run is skipped, take no further action. If an error occurs, report it without trying to repair the code or data.
  • Keep commentary factual: Use only the script's saved summary. Do not invent explanations. Assess changes relative to each product's own size, keep currencies separate and mention missing products first.
  • Restrict automated actions: Run the data-preparation step only once per automation run. Do not bypass readiness checks or replace an existing delivery unless a human explicitly asks. Apart from writing the required commentary file, the agent must not edit other files or record changes in Git during the automated run.

Technical note: The saved summary is summary.json. The script's exit codes are 0 = done, 2 = data not ready, 3 = skipped and 1 = error. The data-preparation command is build; --force bypasses readiness checks and --overwrite replaces an existing delivery. A Git commit records file changes in the repository's history.

  • Installation guide: the skill also explains, step by step, how colleagues set up the process on their own computers: Python packages, database access, the output path and the Teams notification. Anyone in the team can install it and run it.

The most valuable part of the project was documenting the judgement that usually comes from experience: which checks come first and which changes are worth mentioning. Making that knowledge explicit improves the process whether or not an AI reads it.

What it looks like

The notification brings the data checks and commentary together in Microsoft Teams. This example shows a missing product, a restatement and changes in exposure and ECL. It includes only the checks and commentary; the product-and-stage table is not shown. In my workflow, the message is sent automatically without a pre-send review.

✔ Provision basis 2026-10-31 saved – Product C missing

Checks
- Table rebuilt 2026-11-01T06:05:00 ✔
- 6 rows for 2026-10-31 ✔
- ⚠ Product C missing (last month 12.7 MEUR exposure, 0.2 MEUR ECL, last rows 2026-09-30)
- ⚠ 1 restated row(s) vs provision_basis_2026-09-30.xlsx

Comment
- Product C is missing for 2026-10-31 (last month 12.7 MEUR exposure, 0.2 MEUR ECL; last rows 2026-09-30). The file was saved without it.
- Product B ECL rose +8.6 % to 7.0 MUSD while exposure fell -0.9 %.
- The increase comes from stage 2: exposure +36.3 %, ECL +31.3 %.
- Product A ECL fell -2.7 % to 40.6 MEUR, exposure -2.0 %.
- Restatement: Product A stage 2 ECL at 2026-09-30 is 0.18 MEUR higher than delivered.

Note what the comment doesn't say. It doesn't claim that Product B's increase in stage 2 exposure and ECL was ‘driven by deteriorating macro conditions’. That explanation isn't in the summary, so it isn't in the comment. My colleagues and I investigate the cause and add an explanation if one is needed.

What changed for me

  • One hour of work saved on an important reporting day.
  • Data issues are caught early. I can see which product or data source needs investigation.
  • A process colleagues can run too. The installation instructions make it possible for others in the team to use the workflow.
  • Robustness took most of the effort. Documenting the process and writing clear instructions mattered as much as the automation itself.

What I learned about automating credit risk reporting

  1. Keep calculations in code and interpretation with the analyst. Use tested code for calculations and repeatable checks. Give AI the narrower task of drafting commentary from a structured summary; investigating causes remains the analyst's job.
  2. Tell the agent how to respond to each outcome. Clear instructions for a completed run, data that is not ready, a skipped run and an error make the workflow more predictable.
  3. Document the rules you would give a colleague. Specify which facts may be used, prohibit unsupported explanations and keep currencies separate. These instructions matter more than the choice of model.
  4. Give AI aggregated results, not customer-level data. In this workflow, the model receives summary figures by product, currency and stage. This limits the data shared with it; it does not remove the need to consider data protection.
  5. Keep overrides with a person. The skill instructs the agent not to bypass a failed readiness check unless a human explicitly asks. That is a rule for the agent, not an enforced approval gate.

AI helps me focus my attention, but responsibility for the data, the investigation and the final analysis stays with me and my colleagues.

If you're curious how the skill is written, I've shared it on GitHub with a synthetic demo portfolio: github.com/MariaKupa/ai_for_credit_analyst.

Ask me about this article

I read every question and answer them myself. Leave your email if you'd like a personal reply, or check back here for answers I publish.

Only used to reply to you. Never shown on the site.