- ago
There may be a caching issue in WL8 in relation to datasets, or perhaps there is just some setting I need to use, or what I observed is expected behavior.

Environment:
Wealth-Lab 8 version: 8
Extension: TD Ameritrade version 4 for WL8

To re-create the issue:
Create a dataset with one symbol that gets its data from TD Ameritrade.
In the data manager, update the 1-minute data for the above dataset.
Create code for a C# strategy in an external editor (doesn't really matter what editor, use VS Code or whatever).
Create the C# strategy in WL8 and link it to the above (external) C# file.
The strategy should do nothing but write a debug statement in its Initialize method using WriteToDebugLog. The debug statement should write the latest datetime of the BarHistory (e.g. bars.EndDate) so that you can observe the last datetime of the dataset. Compile the strategy from WL8 and save it.
Keep the strategy open in WL8.
For the strategy, in the strategy settings, set the backtest dataset to the aforementioned TD Ameritrade dataset. Set the data scale to 1 minute and the date range to all data. Filter the pre/post market data. Save the strategy.
Backtest the strategy. Observe the debug log for the bars EndDate.
Wait a few minutes.
Update the dataset in the data manager.
Re-backtest the strategy.
In the debug log observe that the bars reported EndDate did not change even though you updated the dataset from the data manager.
In the strategy settings if you change the data range (like from all data to say 3 weeks), wait a minute or two, and then re-backtest the strategy then you can observe in the debug log that the dataset is updated for that particular backtest of the strategy.
Wait a few minutes and re-backtest (don't change any settings). In the debug log observe the last bars EndDate did not change.

Perhaps not updating the dataset within the strategy backtesting is expected behavior, because for when varying the strategy code you want to use the exact same data for backtests from run to run. If not, then that may be a bug.

Also, if you save everything, close WL8, re-open it and then update the dataset and backtest the strategy then the backtest does use the latest data.
0
261
Solved
2 Replies

Reply

Bookmark

Sort
Glitch8
 ( 10.94% )
- ago
#1
This is how WL is designed, it does not request the data again once it's loaded, for efficiency's sake. If you want to force a reload of the data, click the "N Symbols Loaded" message in the status bar before clicking Run Backtest again.

2
Best Answer
- ago
#2
Did you click on "Need to load data" in the strategy window's status bar before re-running the backtest?
0

Reply

Bookmark

Sort