A Python toolkit for high-frequency trade research.
Website: https://cswaney.github.io/hfttools/
HFT Tools is a Python toolkit for financial researchers. It is designed to make data collection simple.
The goal of this project is to provide a common, open-source tool for market microstucture research using NASDAQ HistoricalView-ITCH data. Don't pay for data!
HFT Tools creates scalable, research-ready databases from NASDAQ HistoricalView-ITCH data files. These data files are provided "as is" in a compressed, binary format that is not particularlyl useful. HFT Tools decodes these files and creates tables containing the time series of messages as well as the time series of reconstructed order books.
This package runs on Python3.5. You will also need the following to create databases (these are not installed automatically):
After you have installed and configured these, simply install using the Python package manager. We recommend using a virtual environment:
virtualenv -p python3 venv
source venv/bin/activate
pip install hfttools
To create a new HDF5 database from an ITCH data file itch_010113
:
import hfttools as hft
hft.unpack(fin='itch_010113.bin',
ver=4.1,
date='2013-01-01',
fout='itch.hdf5'
nlevels=10,
names=['GOOG', 'AAPL'],
method='hdf5')
This will create a file itch.hdf5
containing message and order book data for Google and Apple. To read the order book data back into your Python session, use hft.read
:
hft.read(db='itch.hdf5',
date='2013-01-01',
names='GOOG')
For more information, see our tutorial at the projects webpage.
Create massive datasets quickly by running jobs simultaneously (e.g. on your university's cluster). All databases support simultaneous read/write.
This package is released under an MIT license. Please cite me (e.g. HFTTools (Version 0.0.2, 2016)).
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。