What We Learned Training a Neural Network to Operate a Gas Storage Facility
365 daily decisions, stochastic prices, physical constraints, demand obligations. RL took 4 hours for a $1.07M result. Exact adjoint gradients took 39 seconds for $2.19M.
Technical articles on adjoint differentiation, quantitative finance, energy optimization, insurance risk, and scientific computing.
365 daily decisions, stochastic prices, physical constraints, demand obligations. RL took 4 hours for a $1.07M result. Exact adjoint gradients took 39 seconds for $2.19M.
Structured products with digital payoffs have a dirty secret: the Greeks your risk system reports are probably wrong. Bump-and-revalue on discontinuous payoffs produces numbers that depend on your bump size as much as on the market.
Every actuary says you can't apply adjoint differentiation to Variable Annuities — the ratchets are discontinuous, the lapse function is a step function, the withdrawal logic is a cascade of branches. We solved all of them.
Banks solved the sensitivity bottleneck over a decade ago with adjoint differentiation. Insurance hasn't. The barriers are engineering, not math — and none of them turned out to be showstoppers.
The climate risk industry is built on a premise: banks get climate risk wrong because they lack data. The real bottleneck is computation — revaluing a portfolio under each scenario takes days, making sensitivity analysis infeasible.
Put a neural policy on the same differentiable tape as your simulation. Train with exact gradients. 50-350× faster than reinforcement learning, with better results and free Greeks.
If you're designing a risk system from scratch, what should the architecture look like when you design around differentiation from day one? Four abstractions, three kernels, and one principle: separate the what from the how.
Most AAD migration attempts stall because they try to refactor the entire library before turning AAD on. There's a faster path: change double to idouble, one pricer at a time, and see improvement at every step.
FRTB-IMA runs over weekends at many banks. The bottleneck is Greeks — bump-and-revalue makes sensitivity computation O(N) in risk factors. Adjoint differentiation collapses that to a single backward pass.
A step-by-step guide showing how an AI coding assistant integrated AADC into a Monte Carlo option pricer, achieving a 345× speedup with minimal manual intervention.
Despite AAD adoption by ~20% of Tier 1 banks, computing autocallable Greeks remains unsettled. Smoothing + AAD reduces computational cost by 90% — 1M paths achieves 10M path accuracy.
The assumption that GPUs are 1000× faster than CPUs is wrong for most quant workloads. Modern CPUs with AVX-512 and adjoint differentiation close the gap — at 30% lower infrastructure cost.
Sub-second portfolio updates in Python — AADC's JIT compilation eliminates the traditional choice between Python's development speed and C++ production performance.
ML frameworks are general-purpose differentiable programming tools. For quantitative finance workloads — Monte Carlo, path-dependent payoffs, iterative calibration — a domain-specific approach is 40-64× faster.
Overnight batch risk processing is the status quo. The Automatic Implicit Function Theorem turns any calibrated model into a live risk engine — 20ms pricing + Greeks for 1000 IR swaps via QuantLib.
Three approaches to automatic adjoint differentiation exist in production today. They differ in integration effort, memory usage, performance, and scalability. Here's how they compare.
Python for prototyping, C++ for performance — but what if you didn't have to choose? Mix-mode execution compiles Python and C++ into a single optimized kernel.
A practical guide to integrating AADC into existing quantitative libraries — using ORE as the reference example, showing the black-box recording pattern that works on any C++ pricing library.
Traditional cloud risk architectures keep servers running 24/7. Binary kernel deployment enables on-demand live risk — millisecond latency, ~100× cheaper than always-on.
Independent blog post by Serg Kozyarchuk demonstrating a 300× speedup on a 10,000 OIS swap portfolio using AADC with QuantLib — no QuantLib source code modifications required.
Step-by-step guide to accelerating QuantLib with AADC — less than 1% code changes, 6-100× performance improvement, full adjoint Greeks included.
A case study in accelerating Open Risk Engine without understanding its C++ codebase. The black-box approach: record QuantLib/ORE through operator overloading, compile, replay 245× faster.
Prototype in Python, achieve C++ performance. AADC's JIT compiler extracts the computation graph from Python code and compiles it to native AVX-optimized machine code.
Intel developer article explaining how AADC extracts computational DAGs from Python and C++ code, JIT-compiles them for Intel Xeon processors, and delivers orders-of-magnitude speedups.
Joint Intel/MatLogica whitepaper documenting AADC performance on Intel Xeon CPUs — DAG extraction, JIT compilation, and benchmark results for financial simulation workloads.
Application note comparing AADC, PyTorch, and NumPy finite differences for ISDA SIMM margin optimization — AADC delivers exact gradients orders of magnitude faster.