Configuration¶
Centralized pipeline configuration. All tunable parameters live here.
PipelineConfig ¶
Bases: _Settings
Validated, immutable configuration for the ob-analytics pipeline.
Every parameter that was previously a hard-coded literal now lives here with a sensible default matching the original R package behaviour (Bitstamp BTC/USD, 2015). Override individual values for different instruments, exchanges, or precision requirements.
How a feed encodes its prices and timestamps is not set here: each loader reads its own format. An unknown field is refused, so a setting this version no longer has is not dropped silently.
InstrumentGrid
dataclass
¶
The price and size grid a source's data is usually on.
A source declares one as its grid (see
:func:~ob_analytics.protocols.grid_of). The pipeline starts its config
from it, and a field the caller sets wins, so LOBSTER runs on whole shares
without the caller saying so.
Attributes:
| Name | Type | Description |
|---|---|---|
tick_size |
float
|
The price step, in the quote currency. The default is a cent. |
lot_size |
float
|
The size step, in the instrument's own units. The default is a
satoshi ( |
fields ¶
Return the :class:PipelineConfig fields for this grid.
Each step comes with the display precision that shows one step, as
:func:instrument_fields gives them.
config ¶
Return config laid over this grid.
The fields the caller set in config win; every other grid field
comes from this grid. A step the caller set without its display
precision brings the precision that shows one step, as
:func:instrument_fields gives it, rather than the grid's. With no
config, the config is this grid's.