Repository navigation
PowerBridge 0.11.0
Highlights:
--max-bars-backdefaults toauto, so a strategy's warm-up bars no longer trade where MultiCharts' would not, and the quickstart needs no flag (#237).- Bars CSVs are checked: the slash-date order is inferred (or the run asks for
--date-format), and bars that go back in time stop the run (#229, #237). - EL run-time errors and a missing
;stop with one line naming the EL line, instead of a traceback or a silent run (#223, #235). - The
run_el/run_oraclelibrary lives inpl_transpiler.runandpl_transpiler.oracle, andpl_transpile --dialectnames the output dialect (#217, #227). - Some runs give different results or now stop; see the behaviour changes under Changed.
Added
pl_transpile --dialect {runnable,mirror}selects the output dialect with the same names astranspile(src, dialect=...);--no-persiststays as an alias for--dialect mirror(#217).InstrumentConfig.round_turn_cost($ per contract, default 25.0) sets the cost the native audit packet subtracts from each closed trade, instead of a fixed $25. The built-in NQ and ES configs keep 25.0, so their packets are byte-identical; fills and digests do not depend on it (#233).
Changed
- Behaviour change:
--max-bars-backonpl_runandpl_oracledefaults toauto, andmax_bars_backinrun_el/run_oracletoNone(auto), as MultiCharts auto-detects MaxBarsBack. When the lookback cannot be inferred, the default falls back to 0 with a stderr note (an explicitautostill stops with an error). The status line shows the number used (max-bars-back 21 (auto)). Pass--max-bars-back 0(max_bars_back=0) for the old results; digests with an explicit value are unchanged on both engines (#237). - Behaviour change: without
--date-format(date_format=Noneinload_bars_csv/load_bars), the slash-date order of a bars CSV is inferred from the whole file. When it cannot tell, or both orders occur, the run stops with one line asking for--date-format mdyordmy(exit 2). Before, slash dates were read day-first, so a month-first file holding only days 1-12 was silently misread. EL integer dates load as before (#237). - Behaviour change:
pl_run,pl_oracle,load_bars_csvandload_barsstop on bars that go back in time, naming the CSV line (bars out of order at line 4: 2024-01-02 09:29 comes after 2024-01-02 09:31), with exit 2 (ValueErrorin the library). Bars with the same date and time are still accepted (#229). - Behaviour change: a statement or declaration without its closing
;is a syntax error (missing ';' at the end of the statement, line, caret, exit 2). The documented omission beforeElseand attributes like[IntrabarOrderGeneration = False]still parse, andClose Data2-style forms once reported as unimplemented keywords now stop at the missing;. Generated code is unchanged for every file that still parses (#235). - A run-time error in the EL program (array index out of range, division or
Modby zero, any other exception from the generated code) stopspl_runandpl_oraclewith one line naming the EL line and exit 2, instead of a traceback and exit 1. The library raises the newELRuntimeError(with.line), which is also an instance of the original exception type;PB_DEBUG=1shows the traceback (#223). - The library code behind
pl_runandpl_oraclemoved topl_transpiler.runandpl_transpiler.oracle; the CLI modules are thin argument parsers and the old import paths still work (#227). - The
--helptext of every command is in plain language, with maintainer options listed last under "advanced options"; option names and behaviour are unchanged (#225, #229). pl_transpiler.engineno longer re-exports private helpers (_parse_el_date,NQ, ...); import them fromengine_datesandruntime.instrument_config(#217).- The
AUDIT_REF_3_*pinned-digest constants moved totests/reference_pins.py, since only the tests use them (#233). - Internal: the native kernel has one Rust fill engine; the unused copy in
accel/src/engine/is gone. Fills and digests are identical (#231). - The dev tools are pinned in the
devextra and CI installs it, sopip install -e '.[dev]'gives the same lint, type-check and test results as CI (#221). The core modules are fully type-annotated and mypy runs withcheck_untyped_defs(#215).