IRRBB model starter pack in SAS and Python
Measure EVE and NII under the six Basel interest rate shocks. One model, built twice: a SAS programme and a Python notebook. Run it cell by cell and get the same answer on both.
- A synthetic USD banking book of 740 positions, ready to run
- The six Basel interest rate shocks, with a post-shock floor
- EVE, NII, product attribution and a repricing gap
- A SAS programme and a Jupyter notebook with the same 11 cells
- A short PDF run guide for each platform
What is inside
A complete model you run, not only read about.
Each step is a cell with a risk question, the code and a check on the output.
- 1
Banking book data
740 positions and a USD zero curve in one Excel file.
- 2
Basel shock scenarios
Parallel, steepener, flattener and short-rate shocks.
- 3
Cash flows and discounting
Fixed, floating and non-maturity deposits, valued under seven curves.
- 4
EVE by scenario
Base EVE and the change in EVE for all six shocks.
- 5
Product attribution
The worst EVE loss traced to each product and position.
- 6
NII sensitivity
12-month NII under parallel shocks, by product.
- 7
Repricing gap
Nine time buckets with a cumulative gap.
- 8
Built-in checks
Reconciliation, plus a SAS against Python cross-check.
- 9
Run guides
Set-up, a cell map and expected results in two short PDFs.
Take a look
Short guides that get you to a result.

Run guide for SAS 
How to run each cell 
Cell map and reference results
Who it is for
Built for the people who measure the risk.
- Treasury and ALM analysts who measure interest rate risk
- Market risk and IRRBB teams preparing supervisory shock results
- Model risk and validation teams who need a reference build
- Students and researchers learning IRRBB modelling in SAS or Python
What you need: the SAS version runs on your licensed SAS 9.4 or SAS Viya with SAS/ACCESS Interface to PC Files. The Python version runs in Google Colab, VS Code or Anaconda.
Made by Hublyt. Dr Tafirei Mashamba has delivered 20 training programmes for 13 organisations across banking, insurance and listed corporates, and has led IFRS 9 model development for banks in South Africa and Lesotho.
Want to build the full treasury model stack?
Our Treasury and ALM Modelling Masterclass takes you from the balance sheet to integrated stress testing, building each model with agentic AI and checking every number in Python.
See the masterclass