You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the backtest engine, each venue added via BacktestEngine.add_venue() creates an independent SimulatedExchange with its own account and starting balances. Orders route by instrument_id.venue, and the routed order debits that venue's account only — there is no shared balance across venues.
This differs from the real-world broker model, where a single broker (e.g. IBKR) holds one cash balance and routes orders to multiple sub-exchanges (IBIS, ARCA, …).
What I'd like to confirm
Is the above understanding correct — i.e. there is no broker-level abstraction in the backtest that lets one balance fund multiple simulated exchanges?
Is broker-model backtesting (single account, multiple execution venues) on the roadmap, or is it intentionally out of scope for the simulator?
What is the recommended workaround today for users who want a single pot of capital backing trades across multiple exchanges?
Workarounds I'm aware of
Single venue, broker-style: register one venue (e.g. IBKR) and give all instruments that venue id. One balance, but instrument_id.venue no longer reflects the real execution exchange, so per-exchange fills/fees are lost.
Per-venue balances: register each real exchange as a venue and fund each independently. Preserves exchange identity and per-venue fill/fee models, but balances don't pool — capital must be allocated manually per venue, which doesn't reflect how a broker account actually works.
Context
BacktestEngine.add_venue() — adds a SimulatedExchange per venue, each with its own account and balances (backtesting docs)
Orders route by instrument_id.venue and debit that venue's account only
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Question
In the backtest engine, each venue added via
BacktestEngine.add_venue()creates an independentSimulatedExchangewith its own account and starting balances. Orders route byinstrument_id.venue, and the routed order debits that venue's account only — there is no shared balance across venues.This differs from the real-world broker model, where a single broker (e.g. IBKR) holds one cash balance and routes orders to multiple sub-exchanges (IBIS, ARCA, …).
What I'd like to confirm
Workarounds I'm aware of
IBKR) and give all instruments that venue id. One balance, butinstrument_id.venueno longer reflects the real execution exchange, so per-exchange fills/fees are lost.Context
BacktestEngine.add_venue()— adds aSimulatedExchangeper venue, each with its own account and balances (backtesting docs)instrument_id.venueand debit that venue's account onlyThanks!
Beta Was this translation helpful? Give feedback.
All reactions