Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
l2capture
command
Command l2capture polls a public exchange's live level-2 order book and computes order-flow imbalance (OFI) and book imbalance in real time using pkg/signals — the same code the simulator study uses, now on real market data.
|
Command l2capture polls a public exchange's live level-2 order book and computes order-flow imbalance (OFI) and book imbalance in real time using pkg/signals — the same code the simulator study uses, now on real market data. |
|
obdemo
command
Command obdemo is a small end-to-end demonstration of the matching engine: it seeds a book with resting liquidity, then sends a crossing limit order and a market sweep, printing the ladder and the trade tape at each step.
|
Command obdemo is a small end-to-end demonstration of the matching engine: it seeds a book with resting liquidity, then sends a crossing limit order and a market sweep, printing the ladder and the trade tape at each step. |
|
obmm
command
Command obmm runs an Avellaneda–Stoikov market maker through the backtest harness against synthetic noise flow and prints its scorecard.
|
Command obmm runs an Avellaneda–Stoikov market maker through the backtest harness against synthetic noise flow and prints its scorecard. |
|
obwasm
command
Command obwasm compiles the matching engine to WebAssembly and exposes a small JSON API to JavaScript, so the browser demo runs the *real* engine rather than a reimplementation (docs/DEMO-SPEC.md §3).
|
Command obwasm compiles the matching engine to WebAssembly and exposes a small JSON API to JavaScript, so the browser demo runs the *real* engine rather than a reimplementation (docs/DEMO-SPEC.md §3). |
|
ofistudy
command
Command ofistudy runs the order-flow-imbalance experiment and prints whether OFI's link to price is contemporaneous or predictive.
|
Command ofistudy runs the order-flow-imbalance experiment and prints whether OFI's link to price is contemporaneous or predictive. |
|
surveil
command
Command surveil replays a scripted order-flow scenario — a genuine trader, a spoofer layering and pulling large orders, and a quote-stuffer — through the surveillance monitor and prints the alerts it raises.
|
Command surveil replays a scripted order-flow scenario — a genuine trader, a spoofer layering and pulling large orders, and a quote-stuffer — through the surveillance monitor and prints the alerts it raises. |
|
examples
|
|
|
basic
command
Basic example: create an engine, rest a sell order, then cross it with a buy and observe the trade and the resulting book.
|
Basic example: create an engine, rest a sell order, then cross it with a buy and observe the trade and the resulting book. |
|
eventfeed
command
Command eventfeed shows how a downstream adapter consumes the engine's ordered event stream — the integration seam a FIX/OUCH gateway, a market-data publisher, or drop copy would sit on.
|
Command eventfeed shows how a downstream adapter consumes the engine's ordered event stream — the integration seam a FIX/OUCH gateway, a market-data publisher, or drop copy would sit on. |
|
gateway
command
Command gateway shows the pkg/gateway edge controls that belong in the layer *above* the pure matching core (docs/THREAT-MODEL.md §6): an enforcing per-account rate gate that rejects (not just alerts), an asymmetric speed bump on liquidity-taking orders, and a CAT-style audit export off the engine's sequenced event stream.
|
Command gateway shows the pkg/gateway edge controls that belong in the layer *above* the pure matching core (docs/THREAT-MODEL.md §6): an enforcing per-account rate gate that rejects (not just alerts), an asymmetric speed bump on liquidity-taking orders, and a CAT-style audit export off the engine's sequenced event stream. |
|
marketmaker
command
Market-maker example: backtest an Avellaneda–Stoikov quoter against synthetic order flow and print its scorecard.
|
Market-maker example: backtest an Avellaneda–Stoikov quoter against synthetic order flow and print its scorecard. |
|
signals
command
Signals example: compute book imbalance and order-flow imbalance (OFI) from two consecutive book snapshots.
|
Signals example: compute book imbalance and order-flow imbalance (OFI) from two consecutive book snapshots. |
|
pkg
|
|
|
auction
Package auction implements a call-auction uncross: given resting buy and sell interest, it finds the single clearing price that maximises executed volume and reports how much trades there.
|
Package auction implements a call-auction uncross: given resting buy and sell interest, it finds the single clearing price that maximises executed volume and reports how much trades there. |
|
backtest
Package backtest runs a market-making strategy against synthetic order flow in a real matching engine and reports its performance.
|
Package backtest runs a market-making strategy against synthetic order flow in a real matching engine and reports its performance. |
|
gateway
Package gateway provides the pre-trade edge controls that belong in the layer *above* the pure matching core (docs/THREAT-MODEL.md §6): an enforcing per-account rate limit that rejects (not merely alerts), an asymmetric speed bump on liquidity-taking orders, and cancels that are never gated.
|
Package gateway provides the pre-trade edge controls that belong in the layer *above* the pure matching core (docs/THREAT-MODEL.md §6): an enforcing per-account rate limit that rejects (not merely alerts), an asymmetric speed bump on liquidity-taking orders, and cancels that are never gated. |
|
marketdata
Package marketdata models the input side of a market — order flow — and the tools to record and replay it deterministically.
|
Package marketdata models the input side of a market — order flow — and the tools to record and replay it deterministically. |
|
matching
Package matching implements a lean, deterministic matching engine over the price–time-priority order book in package orderbook.
|
Package matching implements a lean, deterministic matching engine over the price–time-priority order book in package orderbook. |
|
orderbook
Package orderbook implements a central limit order book (CLOB) with price–time priority.
|
Package orderbook implements a central limit order book (CLOB) with price–time priority. |
|
signals
Package signals computes market-microstructure signals from order-book snapshots: book imbalance and order-flow imbalance (OFI) to start.
|
Package signals computes market-microstructure signals from order-book snapshots: book imbalance and order-flow imbalance (OFI) to start. |
|
sim
Package sim is a deterministic exchange simulator.
|
Package sim is a deterministic exchange simulator. |
|
strategy
Package strategy implements market-making strategies over the core engine.
|
Package strategy implements market-making strategies over the core engine. |
|
study
Package study contains reproducible microstructure experiments that put the popular trading claims to the test on controllable, deterministic data.
|
Package study contains reproducible microstructure experiments that put the popular trading claims to the test on controllable, deterministic data. |
|
surveillance
Package surveillance detects abusive trading patterns from a stream of order-book events.
|
Package surveillance detects abusive trading patterns from a stream of order-book events. |
|
types
Package types defines the core domain values shared across the order book and matching engine: orders, trades, and the small set of errors they raise.
|
Package types defines the core domain values shared across the order book and matching engine: orders, trades, and the small set of errors they raise. |
|
wal
Package wal provides durable, append-only write-ahead logging and snapshot persistence for the matching engine — the crash-recovery storage backend.
|
Package wal provides durable, append-only write-ahead logging and snapshot persistence for the matching engine — the crash-recovery storage backend. |
Click to show internal directories.
Click to hide internal directories.