Jupyter Notebook is where finance practitioners do their actual work with Python. If you are learning to code as a treasury analyst, regulatory reporting person, or risk manager, you will use Jupyter from day one. It gives you immediate feedback on your code, lets you document your logic as you go, and creates an audit trail of your calculations. This post shows you why, and how to start.
Why Jupyter Notebook matters for finance work
In finance, you spend a lot of time working with numbers that matter. You calculate liquidity coverage ratios, stress test a portfolio, validate a regulatory submission, or reconcile a position file. When you are doing this work, you need to see your results immediately. You need to catch mistakes before they become audit questions. Jupyter gives you that. It lets you write a line of Python, run it, see the output, and adjust your thinking right there. That immediate feedback loop is not just faster than writing a full script and running it from the command line. It changes how you solve problems.
A second reason Jupyter matters in finance is documentation. When you calculate something, you need to show your working. Regulators want it. Your manager wants it. Your colleague who takes over the work wants it. A Jupyter notebook combines your code, your explanations, and your results in a single document. You can version control it (track changes using Git or similar), share it, and come back to it months later and still understand exactly what you did and why.
What Jupyter Notebook is, and how it is different
Jupyter Notebook is an open source application that runs in your web browser. It lets you create a document (a "notebook") that contains executable Python code broken into chunks called cells, plus text, headings, and the outputs of your code all in one place.
That is different from a script. A script is a text file with Python code from top to bottom. You write the whole thing, save it, and run it from the command line. You do not see the results until the entire script finishes, or crashes. If you made a mistake halfway through, you have to go back to the editor, fix it, and run the whole script again.
In Jupyter, you write code in a cell. You run just that cell. You see the output instantly. You write text below it to explain what you just did. Then you write another cell and run it. You are having a conversation with your code, not submitting it for batch processing.
For finance work, this is the difference between knowing whether your FTP calculation is right and hoping it is right.
Jupyter Notebook is free and open source. It is built on top of Python, not instead of Python. You are still writing Python code; you are just running it in a more interactive way.
How to start: installation and your first cell
If you have followed the setup guide in the previous posts, you likely have Jupyter already installed. Check by opening your terminal and typing:
jupyter notebook
If it is installed, your default web browser will open and show the Jupyter file browser. If not, install it via pip:
pip install jupyter
Once installed, navigate to a folder where you want to work and type:
jupyter notebook
A new window will open in your browser showing the directory. Click "New" in the top right, then select "Python 3". A blank notebook will appear.
You will see an empty cell with a blinking cursor. Type something simple:
x = 5
print(x)
A weekly note on treasury, liquidity and practical Python. No spam, unsubscribe any time.
Press Shift and Enter, or Shift and Return on Mac, to run the cell. The code executes, the output appears below the cell, and a new empty cell appears underneath. That is it. You have now run code in Jupyter.
Running code in chunks, and why that changes how you think
The key to Jupyter is that you run code one cell at a time, not the whole notebook at once.
Let me show you why this matters with a concrete example. Suppose you are loading a liquidity position file and calculating how much of it is encumbered. You might work like this:
import pandas as pd
df = pd.read_csv('liquidity_positions.csv')
print(df.head())
Run this cell. You see the first five rows of your data. Is it what you expected? Are the columns there? Is the data clean? You know right now, not after running twenty cells.
Next, you add another cell:
encumbered = df[df['status'] == 'encumbered']
total_encumbered = encumbered['amount'].sum()
print(f"Total encumbered: {total_encumbered}")
Run this. You see the number. Is it reasonable? Does it match what you expected from the source system? You can decide in real time whether to keep going, dig deeper into the data, or go back and change something.
This is different from writing a script with all twenty lines, running it, and finding out on line fifteen that a column name was wrong.
The mental benefit is enormous. You are not holding the entire problem in your head. You are solving it incrementally, with the computer showing you results as you go. That reduces mental load. You catch errors when they are easy to fix. You learn faster because you see cause and effect immediately.
Building a notebook that documents your logic
A good notebook does more than run code. It explains your thinking as you go.
Between your code cells, add text cells. Click in the cell and change the cell type dropdown from Code to Markdown. Then write:
# ILAAP Liquidity Calculation
## Step 1: Load the position data
We are loading the daily liquidity file from the treasury system.
The file contains all customer deposits and wholesale funding positions.
When you run a markdown cell, Shift and Enter, it renders as formatted text. Your notebook now tells a story. Someone reading it, or an auditor reviewing it, can follow your logic from top to bottom.
Code cells plus markdown cells plus output equals a complete record of your methodology. When your manager asks "how did you get that number?", you can hand them the notebook. When the PRA asks to see the calculation, the notebook is your proof.
This is part of why notebooks are so widely used in finance. They are not just tools for getting answers. They are tools for documenting how you got those answers.
Use markdown headings to structure your notebook. Break your logic into clear sections. Future you will be grateful when you come back to the notebook in three months.
Jupyter in real finance scenarios
Let me show you how this works in three real situations you will encounter.
Prototyping a new metric. Your team decides to add a new stress test to your ICAAP submission (Internal Capital Adequacy Assessment Process). You do not know yet whether the data you need is available, or whether the calculation will be straightforward. You open Jupyter, pull the data, write the first version of the calculation, and run it. You see what works and what does not. Once you are confident it is right, you move it to your production Python script. Jupyter is where you explored safely.
Validating a supplier's output. A third party has sent you a reconciliation file. Your job is to check it. You load it in Jupyter, run some checks, compare it to your own numbers, identify the differences, and document your findings. All in one notebook. When you send the findings back, you can send the notebook too. Your colleague can follow exactly what you did.
Building an audit trail. Your regulatory submission includes calculations that matter. A notebook is version controlled, meaning you can track changes and revert to earlier versions if needed using Git or similar tools. You keep it in your repository. Two years later, an auditor asks how you calculated something. You check out the version of the notebook from that date. It is all there: the code, the outputs, the commentary. You can explain it. You have evidence.
The practical takeaway
Jupyter Notebook is not an optional tool for learning Python. It is the environment where finance practitioners actually work with code and data. It gives you immediate feedback, lets you document your logic as you go, and creates an audit trail of your thinking.
Start using it from now. Get comfortable running cells, adding markdown cells to explain your work, and building a notebook that tells the story of how you solved a problem. When you move on to real finance projects, this habit will make you faster, more accurate, and easier to audit.
If you have not installed it yet, follow the setup guide linked below. If you have, create your first notebook today. Load a data file from your work, run one cell, add a markdown note, and keep going. That is Jupyter. That is where the real learning happens.
Get the next one in your inbox
A weekly note on treasury, liquidity and practical Python. No spam, unsubscribe any time.
Practitioner notes on treasury, liquidity, regulatory reporting and practical Python.
