-
Notifications
You must be signed in to change notification settings - Fork 239
Open
Description
Problem description
The backtesting broker includes a process_pending_orders() method which looks at previous day's data (according to the commented code) when the data source is PANDAS. I have noticed a couple of issues when backtesting with minute-level data:
- The
timeshiftparameter forget_historical_prices()has been set to-2however, the returned data is 2 days ahead of the current bar's timestamp. - The code comment says;
This is a hack to get around the fact that we need to get the previous day's date to prevent lookahead bias.whereas, at least with minute-level data, the data is already available and there would be no lookahead bias. - The use of
timeshiftcauses unexpected backtest results (at least with minute-level data). For example, the price that's used to fill orders with is different from the price that's seen during the trading iteration for the asset.
Metadata
Metadata
Assignees
Labels
No labels