Data layer
Market data is held in Polars frames. Bundles are stored as Delta Lake tables (plain Parquet before 2.10.3), and the asset database is SQLite under~/.ziplime by default. Everything a strategy reads from data.current and data.history is a polars.DataFrame.
Async runtime
The engine is asyncio end to end. Asset lookups, data reads and order calls are coroutines, which is why a strategyawaits them. The same runtime drives backtests and live trading, so the strategy code doesn’t change between the two.
Event-driven and vectorized
The vectorized kernel is Ziplime’s own. Install
ziplime[numba] to compile its inner loop; without it the same loop runs interpreted. A sweep’s winner is replayed through the event-driven ledger. See Vectorized Signals.
Fill model
- An order fills on the bar after the decision in the CLI and the MCP server.
run_simulationtakessame_bar_executionexplicitly — see Orders. - The fill price is one bar field —
closeby default, oropen,high,low. - No fill happens on a bar with no volume, and fills are capped at a share of the bar’s volume by the slippage model.
- Commission reaches the cost basis and realised P&L, not only cash.