The full session, start to finish. We build a working rates risk screen in Python and explain every decision as we go. Slides and the complete source code are free to download below.
Free, no sign up. The code is commented in numbered blocks so you can follow it alongside the video, and the sample data is included so it runs the moment you unzip it.
unzip desk-ready-rates-dashboard.zip cd desk-ready-rates-dashboard python3 -m venv .venv source .venv/bin/activate # Windows: .venv\Scripts\activate pip install -r requirements.txt python app.py
Then open http://127.0.0.1:8050. The sample data ships with the pack, so there is nothing to download or configure. If you want to regenerate it with different numbers, run python generate_data.py and change the seed.
pandas, Dash, AG Grid, Plotly and NumPy, and what each one is actually doing.
Virtual environments, why they matter, and picking the right interpreter in VS Code.
Four CSVs: the book, 250 days of yield history, VaR history and the intraday P&L path.
Why a long position makes money when yields fall, and how that single sign drives the whole P&L column.
Historical simulation, the method most desks actually report. No normal distribution assumed anywhere.
Layouts describe the page, callbacks say what recomputes when. You write no JavaScript.
One dict per column: value formatters, aggregation and the conditional formatting that turns P&L red and green.
Pattern matching ids, so the country rail is one callback instead of six near identical ones.
Rebasing series to zero so you read basis points moved, not yield levels. A JGB and a Gilt are not comparable raw.
Make a cell editable, type a new yield, and watch the move, the P&L and the colour all follow.
Every one of these came up while building it. They are the difference between a smooth afternoon and a frustrating one.
AG Grid version 33 and up ship a new theming system. If you style with the classic CSS theme you have to pass theme: "legacy" in dashGridOptions and load the stylesheets yourself. Miss it and you get an unstyled table.
Set filters, row grouping and totals need enableEnterpriseModules=True. Without a licence key they still run in full, you just get a small watermark and a console notice. Nothing is actually restricted.
The grand total row has no value in the columns you did not sum, so every valueFormatter has to cope with null. Otherwise d3 prints NaN across your footer.
Built an interactive rates risk dashboard in Python (Dash, AG Grid) covering P&L attribution, DV01 laddering and historical simulation VaR across six sovereign markets.
Run it, change something, break it, fix it. Then you can talk about it in an interview, which is the entire point. A project you cannot explain is worth nothing on a CV.