Skip to content

Bug: DataSource.warmup_window does not propagate to CCXT provider window_size #379

@MDUYN

Description

@MDUYN

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

  1. Create a strategy with a DataSource that uses warmup_window
  2. Run a backtest that requires indicator warm-up data before the backtest start date
  3. The backtest fails because the CCXT provider doesn't fetch the extra warmup data

Affected Components

  • DataSource.warmup_window parameter handling
  • CCXT data provider window_size parameter
  • Backtest data loading pipeline

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions