Skip to content

What is stable in 0.2.0

This page says which parts of ob-analytics you can build on, and which parts may still change. It sorts the public surface into three groups: promised, provisional and internal.

The rules

Before 1.0 the package keeps no aliases for old names. When a name changes, code that uses the old name stops working in that release. The changelog's "Moving from" section maps each old name to its new name.

  • Promised. We do not plan to change it before 1.0. If it must change, the change comes in a minor release (0.3.0, not 0.2.1) and the changelog lists it.
  • Provisional. It is public and documented, but it may change in any minor release while it settles. The changelog lists each change.
  • Internal. It may change in any release, and the changelog may not list it. A module or name that starts with _ is internal. So is a name that is not in its module's __all__, even when its name has no _.

A patch release (0.2.1, 0.2.2) changes nothing public. It fixes bugs and documentation only.

Promised

Data and files

  • The four tables of a run (events, trades, depth, depth_summary) and the other tables with a contract in ob_analytics.schemas.TABLES: their column names, dtypes and units. The schema page lists them.
  • Prices are whole numbers of ticks and sizes whole numbers of lots. Every timestamp is tz-aware UTC, in nanoseconds.
  • The Parquet folder that save_data writes, with its schema version (currently 4.0) and its key-value metadata. load_data and load_result keep reading the folders an earlier 0.2 release wrote.
  • The capture folder that ob-analytics capture writes, with its format version (capture_format in meta.json). The readers keep reading every earlier version.

Functions and classes

  • Public functions take and return pandas DataFrames. PipelineResult.to_arrow() and PipelineResult.to_polars() are a convenience over the same tables, not a second supported frame type.
  • Pipeline, PipelineConfig and PipelineResult, with their public methods.
  • save_data, load_data, load_result and list_writers.
  • The analysis functions the package root exports, such as order_book, vpin, kyle_lambda, trade_imbalance, bars, features and transaction_costs, and the result types they return (BookSnapshot, VpinResult, KyleLambdaResult, CostSummary).
  • The rule for arguments: input tables are positional, and every setting after them is keyword-only. A parameter is named quotes when the function reads only the touch, and depth_summary when it reads the depth bins too.
  • display_result and PipelineResult.display().
  • plot, plot_result, PipelineResult.plot and available_concepts, the plot concept names, and the levels each concept is drawn at.
  • ObAnalyticsError and its subclasses ConfigError and UnknownNameError.
  • The names of the built-in sources (bitstamp, lobster, databento, depth_csv and the others that ob-analytics sources lists).

Command line

  • The subcommands (process, audit, gallery, capture, sources and the two demos) and the flags the CLI flag reference lists.

Provisional

  • ob_analytics.scan. New in 0.2. Its four functions may change as they are joined to the rest of the package, for example so that a plot or a metric can read a scanned table.
  • The prepare functions' arguments and payloads. Each prepare function has the name of its plot concept, and that name is promised with the concept. Its arguments, and the keys and values of the payload it returns, may change as the plots change. A renderer of your own that reads a payload may need changes in a minor release.
  • The plug-in protocols. Source, OfflineSource, LiveSource, EventLoader, DepthLoader, TradeReader, DataWriter, Metric, Feature and BarRule, the register_* functions, the plot backend registry, and the entry-point groups (ob_analytics.sources, ob_analytics.writers, ob_analytics.metrics, ob_analytics.features, ob_analytics.bar_rules, ob_analytics.plot_backends). A plug-in may need changes in a minor release.
  • The gallery. generate_gallery, build_gallery_model, PlotSpec, GalleryModel and the *_card functions.
  • The order-book engine (ob_analytics.engine).
  • Live capture (ob_analytics.live): the source and settings classes and run_capture. The capture folder they write is promised (see above).
  • The backtester export (ob_analytics.interop). It follows the formats of hftbacktest and NautilusTrader, which can change.
  • Themes and palettes (PlotTheme and its fields).

Internal

  • Every module and name that starts with _.
  • Every name that is not in its module's __all__. Some such names have no _, because another module of the package imports them. For example, ob_analytics.data.canonical_frame and ob_analytics.data.saved_config are shared with ob_analytics.scan.
  • WindowedLoader and LoadedWindow in ob_analytics.protocols. Pipeline.run_windows and the built-in loaders use them, but they are not yet a contract for a plug-in source. Pipeline.run_windows itself is promised.

Before 1.0

1.0 comes when the provisional parts above are either promised or made internal, and one minor release has gone by with no change to a promised name. From 1.0 the package follows semantic versioning. A promised name that must go then gives a DeprecationWarning for at least one minor release before it is removed.