1 Star 1 Fork 0

greatwallisme / hfttools

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

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)).

The MIT License (MIT) Copyright (c) 2016 Colin Swaney Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

A Python toolkit for high-frequency trade research. 展开 收起
Python
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Python
1
https://gitee.com/greatwallisme/hfttools.git
git@gitee.com:greatwallisme/hfttools.git
greatwallisme
hfttools
hfttools
master

搜索帮助