Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
end = dt.datetime.combine(today, dt.time())
if not self._order_generator:
raise ProphetException("Must set an order generator by calling"
"set_order_generator.")
timestamps = trading_days[(trading_days >= start) &
(trading_days <= end)]
effective_start = timestamps[0]
data = self._generate_data(start=effective_start,
end=end,
lookback=lookback)
# Run backtest
return backtest(cash=cash,
data=data,
start=effective_start,
end=end,
slippage=slippage,
commission=commission,
portfolio=initial_portfolio,
order_generator=self._order_generator,
)