The Black-Scholes equation is a heat equation wearing a finance costume. This post derives it the way an engineer would — from a replicating portfolio and Ito's lemma to a parabolic PDE, then a change of variables to the diffusion equation itself — lists the assumptions that make it solvable in closed form, and walks through exactly how each assumption fails in real markets: the volatility smile born on one day in October 1987, fat tails, and the jump-diffusion and stochastic-volatility models built to patch the gaps.
Quantitative Finance
-
Black-Scholes for Engineers: Options Pricing as a Diffusion Problem -
Market Microstructure and Order Books Underneath every stock price is a limit-order book and a matching engine running price-time priority in microseconds. How the book works, why the bid-ask spread is a real cost you pay, what market makers and HFTs actually do, and the honest mechanics of slippage, queue position, and adverse selection.
-
Backtesting Frameworks and the Ways Backtests Lie A systematic autopsy of every mechanism by which a backtest flatters a strategy that will lose money in production. Covers vectorbt, backtrader, and Zipline-reloaded, the full failure catalogue from look-ahead bias to p-hacking, and the validation methods that survive contact with live markets.
-
Building a Paper-Trading Bot with the Alpaca API A practical guide to architecting a small live-trading system on a homelab using Alpaca's free paper trading API, alpaca-py 0.43, websocket streaming, and a Python state machine deployed via Docker Compose.
-
Portfolio Optimization in Python: Mean-Variance, Risk Parity, and the Covariance Problem Markowitz's mean-variance framework is mathematically elegant and practically treacherous. This post works through the geometry of the efficient frontier, the statistical nightmare of covariance estimation at scale, risk parity as the practitioner's escape hatch, and Python implementations that are honest about what "optimal" actually buys you in live trading.
-
Risk Metrics for Engineers: VaR, Sharpe, Sortino, and Max Drawdown Sharpe, Sortino, VaR, CVaR, and max drawdown — each metric captures one slice of portfolio risk while hiding another. This guide explains what each measures, how to compute them in pandas, and where every single one will mislead you.
-
The Kelly Criterion: Position Sizing as an Engineering Problem John Kelly's 1956 formula for optimal bet sizing is not finance mysticism — it is applied information theory. This post derives the criterion from first principles, explores fractional Kelly, quantifies sensitivity to estimation error, and shows why treating position sizing as an engineering problem changes how you think about risk.
-
Decoding Market Indicators with Code: OBV and the Golden Cross from Scratch Technical indicators look like chart-reading mysticism until you implement them — then they reveal themselves as small, deterministic functions over an OHLCV time series. This post takes two classics apart in Python: On-Balance Volume (the cumulative sum that turns volume into a running confirmation signal) and the Golden Cross (a moving-average crossover you can detect exactly with a sign change and a diff). Vectorized pandas implementations, the math behind each, the look-ahead-bias trap that makes naive backtests lie, and an honest accounting of why a lagging indicator is a description of the past, not a prediction of the future.
-
The Engineering of Options Trading: The Greeks as Partial Derivatives For an engineer, an option's price is a function of state variables and the Greeks are just its partial derivatives — Delta is dV/dS, Gamma is the second derivative, Theta is dV/dt, Vega is sensitivity to volatility, Rho to interest rates. This post demystifies the Greeks for a technical audience: the Black-Scholes pricing function and its closed-form Greeks in Python with scipy, the intuition behind each sensitivity, delta-hedging as a feedback control loop, the gamma-theta tradeoff that is the real engine of options P&L, portfolio-level risk aggregation, and an honest accounting of where the model's assumptions break (constant volatility, no jumps, the volatility smile).
-
Bitcoin and Cryptocurrency Explained: How It Works, Benefits, Risks, and Investing Strategies A comprehensive technical and practical guide to Bitcoin and cryptocurrency — covering the cryptographic foundations, blockchain mechanics, UTXO model, consensus algorithms, wallet security, investing strategies, risk management, and an honest assessment of the drawbacks and criticisms in 2026.