01 / ContextThe question
behind the work.
Static price models cannot show how order-book rules, heterogeneous strategies, liquidity withdrawal, fees, and regulation interact to create or contain instability.
My role
I built the simulator, exchange mechanics, agent strategies, benchmark scenarios, stress controls, metrics, test suite, parameter sweeps, plots, and reproducible reporting workflow.
03 / In detailThe exchange engine
MERCURY starts with a continuous double auction rather than a prewritten price path. The exchange handles price-time priority, partial fills, cancels, replaces, iceberg orders, pegged orders, and maker-taker accounting, so prices, depth, and spreads emerge from the interaction inside the book.
I added market-making, momentum, arbitrage, execution, panic, stop-loss, spoofing, and venue-arbitrage agents to give the market different sources of liquidity, pressure, and feedback.
Stress behavior as a measurable output
The scenario library covers flash-crash formation, liquidity withdrawal, cross-asset spillovers, fragmented venues, fee economics, and circuit-breaker controls. Each experiment records market-quality and strategy outcomes rather than relying on a single price chart.
In the circuit-breaker comparison, measured fragility fell from 54.7493 to 21.0714 and crash detections fell from 45 to 9. Cross-asset and venue experiments also produced dislocation, routing, and P&L measures that can be compared across runs.
Research workflow around the simulator
I built benchmark, sweep, plotting, and reporting tooling around the exchange so one scenario can become a repeatable research family. Parameters, objectives, rankings, and visual outputs are kept outside notebook state and published through the same workflow.
The platform includes 18 benchmark scenarios and 67 passing tests across matching mechanics, metrics, reporting, and visualizations. The report bundle lets a reader inspect the conditions, figures, and results without rebuilding the environment from scratch.