numerical methods
4 posts
- Quant interview toolkit · numerical statistics
A one-pass variance you can merge across machines
Derive Welford's update from a moving mean, merge two shard summaries by hand, and diagnose a zero variance caused by floating-point cancellation.
- Quant techniques · simulation
Simulating SDEs: Euler, Milstein and the order of convergence
Euler–Maruyama is the default way to simulate a stochastic differential equation, but its paths converge slowly: halving the error takes four times the steps. One extra term from the Itô–Taylor expansion, the Milstein correction, makes it twice as fast. When that matters, and when it doesn’t.
- Quant techniques · numerical methods
Backing out implied volatility: Newton, vega and a safe starting point
There is no formula for implied vol, but Newton’s method with vega as the derivative finds it in three or four steps. Start it in the wrong place on an out-of-the-money option and it blows up. The Brenner–Subrahmanyam shortcut, the inflection point that guarantees convergence, and a robust solver.
- Quant techniques · Monte Carlo
Randomized quasi-Monte Carlo: Sobol points for option pricing
Replace independent random draws with randomized low-discrepancy points, map them into Gaussian paths, and estimate error across independent scrambles.