nautechsystems / nautilus_trader

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

Fix IB tick level historical data downloading #1653

Closed DracheShiki closed 4 months ago

DracheShiki commented 4 months 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...

DracheShiki commented 4 months ago

And i got no idea why pre-commit doesn't work while merging. on my local maschine: image

It's weird. By pushing in Terminal it shows "everything up-to-date", but by Github Desktop i can push it once more...

rsmb7z commented 4 months ago

LGTM for now. We can later improve further with further testing.

cjdsellers commented 4 months ago

Many thanks @DracheShiki 🙏.