Skip to content

Dev - #41

Merged
arbuzovv merged 4 commits into
masterfrom
dev
Oct 14, 2026
Merged

Dev#41
arbuzovv merged 4 commits into
masterfrom
dev

Conversation

@arbuzovv

Copy link
Copy Markdown

No description provided.

nikolalosic and others added 4 commits October 13, 2026 11:59
- Fixed Polars SchemaError in _process_data when applying offset_by with timedelta objects
- Fixed dead code return and timestamp conversion in _DatetimeParam and Date.
- Fixed camel_case_to_snake_case crash on empty string inputs.
- Add tests for lib package
- Fixed LabelArray constructor in case when type is not numpy array
- Add tests for data/services package
- return dataframe from load_data_in_memory in csv data source
- Normalize date when getting calendar session minutes in bundle service

Signed-off-by: Nikola Losic <nikolalosic@protonmail.ch>
Each listing is now judged by its own venue's hours. Before, every listing
was judged by the simulation's calendar, so on an hourly run clocked on
Moscow an American ETF counted as tradeable at 10:01 Moscow (03:01 in New
York) and the order failed with CannotOrderDelistedAsset.

- ziplime.utils.venue_calendars: MIC -> calendar table, a FORTS calendar
  built on XMOS, clock_calendar_name() for a run that spans venues (24/5
  when their hours differ), ZIPLIME_VENUE_CALENDARS overrides.
- ExchangeAsset.trading_calendar; BarData asks the listing's venue (by
  session day on a daily run, by minute intraday).
- rebalance() leaves a leg alone while its market is shut, instead of
  failing the run on the first such bar.
- The no-price error names the closed venue and both calendars.
- algopack://market/dataset[/granularity] mounts and
  context.algopack_dataset(), adapted to the DataSource API that takes a
  trading calendar. New extra: ziplime[algopack] (moexalgo).

Single-market backtests are unchanged. Ported from the 1.20.9 build the
backtesting service has run since September, with its tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…and addresses

The Moscow-specific parts of the previous commit belong in zipfinam, the
Russian-market extension, not in the core:

- AlgoPack is removed from ziplime (connector, algopack_dataset(), the
  algopack extra and its tests). zipfinam ships it.
- The FORTS calendar and the MISX/RTSX venues are removed from the venue
  table. zipfinam registers them.

What stays is the engine mechanism and two ways for an extension to plug in:

- ziplime.utils.venue_calendars: register_venue_calendars() /
  unregister_venue_calendars(), and the ziplime.venue_calendars entry point
  group, loaded on first lookup. Precedence: shipped table < extensions <
  ZIPLIME_VENUE_CALENDARS.
- ziplime.data.data_sources.address_schemes: register_address_scheme() and
  the ziplime.address_schemes entry point group. _resolve_named_data_source
  mounts scheme://... through it; hf:// stays built in. Extensions no longer
  need to patch TradingAlgorithm.

Installing an extension is enough; nothing has to import it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Per-venue trading calendars and extension points for venues and data addresses (2.11.0)
@arbuzovv
arbuzovv merged commit cab1b77 into master Oct 14, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants