Skip to content

jstr045329/ib-data-acquisition

Repository files navigation

dataAcquisition

This program connects Interactive Brokers' Trader Workstation to a MongoDB instance, and transfers data from one to the other. The motivation for this project is that an earlier, larger project was trying to do too much in 1 program - data acquisition, making trading decisions, and doing data science all at the same time. I decided to make 1 repo that does acquisition and nothing else.

I chose MongoDB initially because I wasn't sure at the time how much fields would vary from 1 record type to another. I may change the database to a relational database in the future, because record types did not vary as much as I initially thought. Additionally, a relational database can be set up to store data in some kind of order, such as the timestamp on the stock data. That comes with a nice speed advantage during querying because time series analysis algorithms (should) always have a finite traceback length; i.e. you only need to look X days in the past to make a trading decision. Only needing to look Y records up from the bottom of a table means you don't need to search the entire database every time you run an algorithm.

As it is right now, this project is scalable w.r.t. number of compute instances. You can run as many copies of this as you want to acquire as many real time stock signals as you want, perhaps using a cluster of MongoDB instances to aggregate all the data. You could make it scalable w.r.t. data size by 1) using additional mongo instances that only store enough data to satisfy an algorithm's traceback length, or 2) using a relational database instead.

About

Acquires stock market data from Interactive Brokers and puts it in a MongoDB instance.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages