1 Star 1 Fork 0

greatwallisme / hfttools

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
README.md 2.25 KB
一键复制 编辑 原始数据 按行查看 历史
Colin Swaney 提交于 2016-09-09 20:59 . More documentation

hfttools

A Python toolkit for high-frequency trade research.

Website: https://cswaney.github.io/hfttools/

What?

HFT Tools is a Python toolkit for financial researchers. It is designed to make data collection simple.

Why?

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!

Sure. But what does is actually do?

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.

Installation

alt text

Requirements

This package runs on Python3.5. You will also need the following to create databases (these are not installed automatically):

  1. HDF5.
  2. PostgreSQL

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

Basic Usage

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.

Tips

Create massive datasets quickly by running jobs simultaneously (e.g. on your university's cluster). All databases support simultaneous read/write.

License

This package is released under an MIT license. Please cite me (e.g. HFTTools (Version 0.0.2, 2016)).

Python
1
https://gitee.com/greatwallisme/hfttools.git
git@gitee.com:greatwallisme/hfttools.git
greatwallisme
hfttools
hfttools
master

搜索帮助