Comments (3)
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.
@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.
Closing this issue for now
from qtpylib.
Related Issues (20)
- [BUG] TypeError: unsupported operand type(s) for -: 'float' and 'str'
- [BUG] Find available cash and account value inside strategy. HOT 1
- Ujhj
- Dependabot couldn't authenticate with https://pypi.python.org/simple/
- [BUG] pip install error (different than issue #141) HOT 1
- How can I add an FX broker using MT4/5 platform?
- ATR differences with TradingView
- How to backtest options strategy? How to add options data to MySQL database from csv?
- How to "first cross"
- Documentation down HOT 1
- Cannot install from PYPI server HOT 3
- [BUG] HOT 1
- http://www.qtpylib.io/ not accessible - documentation offline ? [BUG] HOT 1
- Order book logging and back testing
- Increase the usage of augmented assignment statements
- Arguments Helps
- Fatal Errors during installation (after preparing isolated conda environment for pip installation) [BUG] HOT 2
- [BUG] No module named 'Queue' in ibpy2 dependency HOT 2
- [BUG] error: invalid path 'Icon?'
- [BUG] module 'pandas' has no attribute 'ewma'
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from qtpylib.