nautechsystems / nautilus_trader

A high-performance algorithmic trading platform and event-driven backtester
https://nautilustrader.io
GNU Lesser General Public License v3.0
1.7k stars 400 forks source link

Temporal fix for the bug that leads to endless loop at the end of day when downloading tick-level historical data from Interactive Brokers. #1652

Closed DracheShiki closed 1 month ago

DracheShiki commented 1 month ago

Pull Request

Temporal fix for the bug that leads to endless loop at the end of day when downloading tick-level historical data from Interactive Brokers.

Type of change

How has this change been tested?

    if min_timestamp.floor("S") == max_timestamp.floor("S"):
        max_timestamp = max_timestamp.floor("S") + pd.Timedelta(seconds=1)

the original related code here only works in the following situation: nt bug 1 but doesn't work in the following situation: nt bug 2

Temporal fix. There must be better way than mine...