Skip to content

Add support for historical data download with backtest node#2574

Closed
faysou wants to merge 1 commit into
developfrom
historical_data
Closed

Add support for historical data download with backtest node#2574
faysou wants to merge 1 commit into
developfrom
historical_data

Conversation

@faysou

@faysou faysou commented Apr 29, 2025

Copy link
Copy Markdown
Collaborator

Pull Request

Added possibility to request backtest data during a backtest using a LiveMarketDataClient adapter

  • Add possibility to add LiveMarketDataClients to backtestnode
  • Add possibility to query new historical data during a backtest (which can be future data from the point of view of a past backtest time point), using existing LiveMarketDataClients without any change to them
  • Subscribed data can also be requested periodically with a duration parameter in order to avoid large data requests
  • data_client.py has been updated so it's possible for tasks to run in a sync way during a backtest
  • Subscription during backtests can be captured by the backtest engine and transformed into a request to LiveMarketDataClient in order to download the required data
  • This downloaded data can then be saved to a catalog (the next PR improves the saving system in a catalog in order to handle arbritrary disjoint time ranges that may be created during the dynamic download of data)
  • When a LiveMarketDataClient is registered for a venue, it can be used for requests but not for subscriptions, a default backtest market data client is used instead in this case

Type of change

  • New feature (non-breaking change which adds functionality)

How has this change been tested?

Tested data requests from live market client using an included example that works with databento
databento_backtest_with_data_client.py

@faysou faysou force-pushed the historical_data branch 2 times, most recently from d3bb1c7 to e4faaf4 Compare May 2, 2025 20:52
@faysou faysou changed the title Add support for historical and future data in backtesting engine Add support for historical data download with backtest node May 5, 2025
@faysou faysou force-pushed the historical_data branch 3 times, most recently from a942f12 to 1fa4a17 Compare May 10, 2025 16:35
@faysou faysou force-pushed the historical_data branch 2 times, most recently from 88b0a6c to 34a7a17 Compare May 13, 2025 08:00
@faysou faysou force-pushed the historical_data branch from 34a7a17 to cb99253 Compare May 16, 2025 10:31
@faysou faysou closed this May 20, 2025
@cjdsellers cjdsellers deleted the historical_data branch July 21, 2025 00:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant