Overlapping bars and the broker that rebuilds history
Posted: Fri Oct 30, 2026 9:04 am
Overlapping bars and the broker that rebuilds history
Historical data on some platforms is not fixed. Brokers revise it, patch gaps, and sometimes replace stretches with data from other sources.
A backtest run last month and again today may produce different results on the same dates. The data changed under it.
This is particularly annoying for tight strategies. A one-tick difference in a bar's high can change whether a target was hit.
Keeping a personal copy of the dataset used in each test avoids the problem. It also provides a stable base for comparing strategy versions.
For live recording, saving raw ticks to files with timestamps takes little storage. A year of one major pair's ticks is a few gigabytes. It becomes an asset after a couple of years.
Another symptom is an indicator that suddenly shows different values on old bars after a restart. The code did not change. The history underneath did. Spotting this early saves hours of chasing a bug that does not exist, and a hash or a copy of the file before each test run makes the culprit obvious.
Is a personal archive of tick data being kept, or is each test relying on whatever the broker supplies that day?
Historical data on some platforms is not fixed. Brokers revise it, patch gaps, and sometimes replace stretches with data from other sources.
A backtest run last month and again today may produce different results on the same dates. The data changed under it.
This is particularly annoying for tight strategies. A one-tick difference in a bar's high can change whether a target was hit.
Keeping a personal copy of the dataset used in each test avoids the problem. It also provides a stable base for comparing strategy versions.
For live recording, saving raw ticks to files with timestamps takes little storage. A year of one major pair's ticks is a few gigabytes. It becomes an asset after a couple of years.
Another symptom is an indicator that suddenly shows different values on old bars after a restart. The code did not change. The history underneath did. Spotting this early saves hours of chasing a bug that does not exist, and a hash or a copy of the file before each test run makes the culprit obvious.
Is a personal archive of tick data being kept, or is each test relying on whatever the broker supplies that day?