About DeanOS

A portfolio risk and modeling engine built by Dean Cabanes, an economics student.

Why I built it

I wanted to understand the risk models I kept reading about: how a GARCH model decides volatility is rising, what a hidden Markov model means by a "regime", why Value at Risk is both everywhere and constantly criticized. Reading about them only went so far, so I built them, first as a personal tool and then as this public version.

DeanOS is not a trading system and I am not a professional quantitative researcher. It is what happens when you teach yourself enough to build working models, test them against known results, and keep finding out where their assumptions break.

How it was built

I used AI coding assistants throughout, the same way many engineers now do. The work that mattered was deciding what the tool should answer, choosing the models and their assumptions, checking results against reference implementations and published formulas, and deciding what to change when something did not hold up.

Rebuilding it for the public is a good example. Rechecking each model turned up real problems: one "Monte Carlo" VaR was the normal-distribution VaR with noise added, a volatility forecast was labeled as an average when it was a single day, and the regime model's fixed random seed was landing on a clearly worse fit. Each page under Methodology lists what changed and why.

How it works

  • A Python engine (NumPy, pandas, SciPy, statsmodels, arch, hmmlearn, scikit-learn) behind a FastAPI service.
  • A Next.js front end with charts drawn directly in SVG.
  • A nightly job that rebuilds the market data snapshot and precomputes the regime model.
  • Around 80 automated tests that check the models against exact values and reference implementations.

What it is not

Nothing here is investment advice or a prediction. The models describe historical data under stated assumptions, and every one of them fails in ways the methodology pages describe. The example portfolios are illustrations, not recommendations. Portfolios you enter stay in your browser's address bar and are never stored.