trader.evaluation.backtest_evaluator module

Approve a signal only if the same strategy has worked on this symbol.

Deliberately conservative and deliberately dumb: it asks one question — would this strategy have made money on this symbol recently, without an unacceptable drawdown — and answers it with the same engine trader backtest uses. Its value is that it is reproducible, not that it is clever. The LLM evaluator that replaces it next slice will be judged against these numbers.

class trader.evaluation.backtest_evaluator.BacktestEvaluator(strategy, config, backtest_config=None)[source]

Bases: object

Gates a signal on a backtest of the same strategy over the same bars.

Parameters:
evaluate(symbol, bars, signal)[source]

Run the backtest and turn its metrics into an approval decision.

Parameters:
  • symbol (str)

  • bars (Sequence[Bar])

  • signal (Signal)

Return type:

Verdict