What a listing’s venue decides
data.can_tradeasks the listing’s venue. On a daily run: did the venue trade that day? On an intraday run: is it open this minute?- Ordering a listing whose market is shut raises an error that names both the listing’s calendar and the simulation’s.
context.rebalanceleaves a leg alone while its market is shut — neither ordered nor closed.ExchangeAsset.trading_calendaris the listing’s own calendar, orNonefor a venue the table doesn’t know; those fall back to the simulation’s calendar.
Built-in venues
Moscow is not built in: zipfinam (1.26.10.1 or later) registers
MISX on XMOS and RTSX on its own FORTS calendar. Without it, Moscow listings are judged by the simulation’s calendar.
Clocking a mixed run
The simulation calendar has to visit every minute any of the run’s venues trades.clock_calendar_name picks one:
ziplime run -c ..., or run_simulation(trading_calendar=...)). When one venue’s calendar already visits every minute the others trade, that calendar is used; otherwise the answer is 24/5 (every weekday, around the clock), or 24/7 when any venue never closes. Leave the benchmark’s listing out of the list — it is read, not traded.
calendar_for_mic(mic) returns the ExchangeCalendar a venue keeps.
Overrides
SetZIPLIME_VENUE_CALENDARS to add or replace venues without a new release:
Extensions
A package can add venues, calendars and data-source addresses without patching Ziplime. Venues. Callregister_venue_calendars({MIC: calendar_name}) on import, or advertise a mapping under the ziplime.venue_calendars entry point group, which is loaded on first lookup:
register_address_scheme(scheme, mount), or advertise the mount under the ziplime.address_schemes entry point group. A strategy then reads data.history(..., data_source="scheme://...") with no registration of its own:
mount(address, *, asset_service, start_date, end_date, trading_calendar) and returns a DataSource (or an awaitable of one). It should accept and ignore keyword arguments it doesn’t use. hf:// is built in.
Data providers. Ingest connectors register under the ziplime.data_providers entry point group; ziplime providers lists what an install can use.