Strategies API¶
arbitrix_core.BaseStrategy ¶
on_bar ¶
on_bar(row: Series, portfolio: 'Portfolio', regime_output: Any = None, ctx: 'SymbolContext | None' = None) -> list[Signal]
Called once per prepared bar in backtest and live modes.
ARB / Sub-spec 1: ctx is the :class:SymbolContext for
self.symbol. Engines pass it when the override accepts it; legacy
strategies (no ctx parameter) keep working via inspect-based
dispatch in _invoke_strategy_on_bar.
arbitrix_core.Signal
dataclass
¶
Discrete trading intent emitted by a strategy.
The additional order fields are optional so legacy strategies that only
populate when, action and price keep working without changes.
arbitrix_core.Trade
dataclass
¶
Represents a completed or open trade linked to an entry order.
arbitrix_core.Order
dataclass
¶
Represents a pending or filled order in the backtest/live domain.
arbitrix_core.Position
dataclass
¶
Aggregated view over multiple trades.
arbitrix_core.InstrumentConfig
dataclass
¶
Lightweight metadata describing a tradable instrument.
Extracted into the core namespace so that importing backtesting helpers does not implicitly require the heavier configuration loader machinery.