Three projects, built from first principles

Projects

Three tools built from first principles in Python, covering pricing, risk, and allocation. Each page goes through the math, the checks that show it works, and the code.

Move across the figure to set the spot price
01 · Derivatives pricing

Options pricing & volatility

Black-Scholes-Merton and binomial tree pricers, analytical Greeks, a PDE solver, and an implied volatility solver that turns a live options chain into a volatility surface.

contracts IV-solved
3,800+
for the full SPY chain
< 4 s
expiries per surface
32
  • BSM
  • CRR tree
  • Crank-Nicolson
  • Greeks
  • Newton-Raphson IV
  • Python
  • NumPy
  • SciPy
  • pandas
  • Streamlit
  • Plotly
Read the write-up
Re-runs between calm and crisis correlations
02 · Risk

Monte Carlo risk engine

Correlated return simulation through a hand-written Cholesky decomposition, VaR and CVaR, risk attribution by holding, correlation stress tests, and Kupiec backtesting.

Cholesky residual
10−15
built-in checks
5
dashboard tabs
6
  • Cholesky
  • VaR / CVaR
  • Component VaR
  • Stress tests
  • Kupiec POF
  • Python
  • NumPy
  • SciPy
  • pandas
  • Streamlit
  • Plotly
Read the write-up
Move across the figure to pick a portfolio on the frontier
03 · Forecasting and allocation

Return forecasting & optimization

A Temporal Fusion Transformer forecasts five-day return quantiles, which feed mean-variance optimization with shrinkage covariance and a walk-forward backtest against simple benchmarks.

features per asset
5
day forecast horizon
5
dashboard tabs
6
  • TFT
  • Quantile loss
  • Markowitz
  • Shrinkage
  • Walk-forward
  • Python
  • PyTorch
  • NumPy
  • SciPy
  • Streamlit
  • Plotly
Read the write-up