-
Notifications
You must be signed in to change notification settings - Fork 92
Description
Summary
DataSource.warmup_window does not propagate to the CCXT data provider's window_size parameter, causing backtests to fail when warmup data is requested before the loaded data range.
Current Behavior
When a strategy uses warmup_window on a DataSource, the framework does not pass this value through to the CCXT provider's window_size. As a result, backtests that need warmup data (e.g., for computing indicators like EMA/RSI before the actual backtest start date) fail because the data provider doesn't fetch enough historical data.
Workaround
In tests/scenarios/test_readme_example.py, the README-extracted code replaces warmup_window= with window_size= before executing, which masks the underlying issue:
# Workaround: replace warmup_window with window_size
code = code.replace("warmup_window=", "window_size=")Expected Behavior
Setting warmup_window on a DataSource should automatically propagate to the underlying data provider (including CCXT) so that sufficient historical data is fetched for indicator warm-up periods.
Steps to Reproduce
- Create a strategy with a
DataSourcethat useswarmup_window - Run a backtest that requires indicator warm-up data before the backtest start date
- The backtest fails because the CCXT provider doesn't fetch the extra warmup data
Affected Components
DataSource.warmup_windowparameter handling- CCXT data provider
window_sizeparameter - Backtest data loading pipeline