Skip to content

v0.1.3 — silence per-bar trace flood in default backtest output

Latest

Choose a tag to compare

@YuanZongjian YuanZongjian released this 05 May 03:37
· 58 commits to master since this release

User-facing logging cleanup. echolon hello and the default echolon backtest single path no longer flood stdout with per-bar [DEBUG] Bar N | START/END and per-trade BUY EXECUTED / TRADE # CLOSED lines. The user now sees a one-line Sharpe summary plus a handful of workflow milestones; opt in to the full trace via --verbose (or -v).

New

  • New summary run_context (echolon.backtest.logging_utils). Root INFO so workflow milestones remain visible ([BACKTEST_RUNNER] Complete, [STRATEGY_BRIDGE] Indicators); bar-loop loggers (backtrader_strategy, strategy.component, contract-aware/session-aware hooks) demoted to WARNING. echolon hello and non-verbose echolon backtest single use this by default.

Fixed

  • should_log_details now correctly gates only debug and best_trial (was: every non-optimization context, which accidentally enabled per-bar trace for every default invocation).
  • Gated BUY/SELL EXECUTED and TRADE CLOSED Backtrader prints behind should_log_details. Order-rejection prints stay unconditional so errors always surface.
  • BacktestRunner.run no longer silently coerces unknown contexts to best_trial; canonical RunContext values pass through verbatim.
  • ContextVar default "debug""summary" so callers that hit logger paths without first calling setup_backtest_logging don't flood stdout.
  • echolon backtest single --verbose help text + docstring corrected (previously claimed it surfaced a DEBUG trace, but the trace was always on).

Verification

  • 739/739 tests pass (3 new regression tests).
  • Live: default output reduced from ~1500 lines to 36 with the Sharpe summary visible at the bottom; --verbose restores the full 2069-line trace.

Install

```bash
pip install --upgrade echolon
```