MiniCTRM - Build Tutorial 703: Monte Carlo VaR: ten thousand tomorrows on the same engine
→ to begin · N for the speaker notes
On a phone: Next or a swipe left to begin, Notes for the words.
What you'll learn
A scenario source behind the VaR engine with the historical figures unchanged to the digit and Expected Shortfall at each level, volatilities and a by-curve-by-month correlation matrix calibrated from the closes with a fingerprint and a calibration id, correlated seeded batched draws with antithetic pairs and a Student-t toggle, a Monte Carlo run in parallel on the worker pool with compressed per-deal vectors on the server database, VaR and ES with their standard error and a convergence table, the closes, the scenarios and the per-deal valuations exported and a scenario set imported from a file for a firm-wide VaR, historical and Monte Carlo side by side and backtested with VaR and ES limits that name their method, and a model-risk page with the rules in CLAUDE.md.
Why MiniCTRM stops at history – MiniCTRM's reason: a technology decision for a teaching system on one file, and a view about accuracy.
What you need first – The VaR engine reused unchanged, and the capabilities the run leans on; where this lesson sits in a from-scratch build.
The model, from zero – Returns, volatility, correlation and the covariance matrix; Cholesky, lognormal moves, seeds, the noise and model risk.
A scenario source, calibrated from the closes – One seam in the engine with a golden file to prove it, then volatilities and a by-curve-by-month correlation matrix from your own closes.
Ten thousand tomorrows, in parallel – Correlated, seeded, batched draws; the run as a job of batches across the worker pool, compressed, with a standard error on every figure.
Everything is correlated: a firm-wide VaR – Why the firm's VaR adds per-deal vectors across desks and never VaRs; closes out, scenarios out and in, valuations out, through lesson 623's pipeline.
Side by side, the model-risk page, then ship – Both methods on one book and date, backtested, limits per method; the page a committee reads and the rules in CLAUDE.md; /ship.
How MiniCTRM did it – Help → Monte Carlo VaR, the reason in MiniCTRM's words, and Profit at Risk, MiniCTRM's one Monte Carlo.
Copyright 2026-2027 Brian Shydlo. MiniCTRM is source-available under the PolyForm Strict License 1.0.0 (https://polyformproject.org/licenses/strict/1.0.0): free for learning and other noncommercial use; no changes and no redistribution; commercial use needs permission.
Welcome
Ten thousand tomorrows
1 / 17Why MiniCTRM stops at history
A technology decision
2 / 17What you need first
What you need first
3 / 17The model, from zero
Returns, volatility, correlation, covariance
4 / 17The model, from zero
Cholesky, lognormal moves, seeds and the noise
5 / 17A scenario source, calibrated from the closes
A scenario source behind the engine
6 / 17A scenario source, calibrated from the closes
Calibration from the closes
7 / 17Ten thousand tomorrows, in parallel
Correlated draws, ten thousand tomorrows
8 / 17Ten thousand tomorrows, in parallel
The run: parallel, batched, compressed
9 / 17Everything is correlated: a firm-wide VaR
Everything is correlated: a firm-wide VaR is a sum of vectors, not a sum of VaRs
10 / 17Everything is correlated: a firm-wide VaR
Files in, files out
11 / 17Side by side, the model-risk page, then ship
Side by side, backtested, limits per method
12 / 17Side by side, the model-risk page, then ship
The model-risk page and the rules
13 / 17Side by side, the model-risk page, then ship
Ship it
14 / 17How MiniCTRM did it
Help → Monte Carlo VaR: the reason, in MiniCTRM's words
15 / 17How MiniCTRM did it
Profit at Risk: MiniCTRM's one Monte Carlo
16 / 17What you have now
What you have now
17 / 17
You have finished lesson 703, Monte Carlo VaR: ten thousand tomorrows on the same engine.