Giter VIP home page Giter VIP logo

Comments (3)

ranaroussi avatar ranaroussi commented on May 21, 2024 1

Short answer: All market data is constructed, based on IB's tick data.

Longer answer: The blotter stores IB "tick" data as the come in, and aggregates that data as 1-minute bars to be stored in the database.

When back-testing, the historical data is being pulled from the database. Currently, you cannot backtest using csv files for historical data - but I will be introducing a mechanism for automatic backfill of historical data, as suggested in issue #2, in the very near future.

For all time-based resolutions/frequencies larger than 1 minute are constructed from the 1-minute bars in the bars table, while all resolutions (second, tick, and volume) are constructed from previously stored tick data in the ticks table.

When live-trading, OHLC bars are being constructed in real-time from IB's tick data, based on the strategy's resolution.

I hope this makes sense :)
Ran

from qtpylib.

lemieuxm avatar lemieuxm commented on May 21, 2024 1

@ranaroussi, while I understand the motivation behind using the lowest common denominator and basing all computations off of that, the breadth of changes in each instrument is not reported to end user tools (for any broker). The range of bars you get when subscribing to bar data will be larger than the range you will see in ticks. For a library like this, it really is preferrable to base larger time period computations off of bars computed at the source rather than the subset of data TWS has visibility into. See Issue #111 for an example.

from qtpylib.

ranaroussi avatar ranaroussi commented on May 21, 2024

Closing this issue for now

from qtpylib.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.