bootstrap_strategy#

bootstrap_strategy(timed_task_context_manager, path, **kwargs)[source]#

Bootstrap a strategy to the point it can accept its first tick.

Returns an initialized strategy.

Parameters
  • lookback – How much old data we load on bootstrap

  • kwargs – Random arguments one can pass to factory / StrategyRunner constructor.

  • now – Override the current clock for testing

  • timed_task_context_manager (AbstractContextManager) –

  • path (Path) –

Raises
  • BadStrategyFile

  • PreflightCheckFailed

Returns

Tuple of loaded and initialized elements

Return type

StrategyExecutionDescription