Interactive Demos
Adverse Selection Simulator
TypeScript, React, Seeded RNG
This simulator demonstrates why bid-ask spreads exist in financial markets. Market makers provide liquidity by quoting both buy and sell prices, earning the spread on each trade. However, some traders have private information about the true value (informed traders), while others trade for non-informational reasons (noise traders).
When informed traders dominate, they systematically trade against the market maker's quotes, causing losses. The MM detects this "toxic flow" and widens spreads defensively. This is the Glosten-Milgrom model in action.
Live Simulation
Try: Set informed flow to 0% (MM profits) vs 60%+ (MM loses, spreads widen)
25%
0.40
0.15%
$0.12
MM P&L
$0.00
Spread
$0.12
Trades
0
Adverse %
0%
Quant Engine CLI
C++20, CMake, Docker, PostgreSQL
The Quant Engine is a C++20 research tool for backtesting trading strategies. It reads historical OHLCV data, applies strategy logic, and outputs performance metrics. Results are persisted to PostgreSQL. Features Black-Scholes pricing with full Greeks.
# Step 1: Build the C++ engine cmake -S cpp/engine -B build_x64 -G "Visual Studio 17 2022" -A x64 cmake --build build_x64 --config Release # Step 2: Run tests ctest --test-dir build_x64 -C Release --output-on-failure # Step 3: Start API + Postgres docker compose up -d --build curl http://127.0.0.1:8787/health # {"ok":true} # Step 4: Run a backtest .\build_x64\Release\qe_cli.exe backtest --data .\data\sample.csv --out .\out # Step 5: Query stored runs curl http://127.0.0.1:8787/runs
Backtest Simulator
Python, FastAPI, pandas, numpy
The Quant Toolkit provides backtesting via Python library and REST API. This demo simulates running a backtest with different strategies on randomly generated price data.
Strategy Backtest
| Metric | Value |
|---|---|
| Total Return | - |
| CAGR | - |
| Sharpe Ratio | - |
| Max Drawdown | - |
| Win Rate | - |
| Total Trades | - |
Note: Uses randomly generated data. The real Quant Toolkit runs on historical data with transaction costs.