pytdx
pytdx copied to clipboard
关于盘后存储数据库的选择,能否提供相应的API支持
我推荐如下一些时序数据库: tstables(HDF5) https://github.com/mysl/tstables /https://github.com/afiedler/tstables
A Python package to store time series data in HDF5 files using PyTables.
It stores time series data into daily partitions and provides functions to query for subsets of data across partitions.
HDF5做的time series data,以Day为分区(分块)存储数据,并能够跨区(分块)访问数据
尤其适合于存储:TICK数据/1MIN数据/...
InfluxDB
http://www.algotrader.com/algotrader-3-1-integrates-influxdb/
We’re pleased to announce that AlgoTrader release 3.1 will use InfluxDB for storage of live and historical market data.
InfluxDB is an open source database specialized in handling time series data with high availability and high performance requirements. It’s the world’s top ranked time series database, according to the DB-Engines Ranking of Time Series DBMS.
Benefits of InfluxDB include:
Easy installation with zero dependencies, yet highly extensible
Store up to one million values per second
Time-centric functions with a simple SQL-like query language
Supports data tagging for flexible queries
Highly efficient compression to reduce storage footprint
Supports a range of high-availability and clustering schemes
Market data is the foundation upon which quantitative trading strategies are built. It’s often necessary to store and process vast amounts of historical data to back test and run strategies. InfluxDB simplifies this process and enables AlgoTrader to deliver the following new features:
Record live tick data (one million ticks per second)
Storage of downloaded historical data
Automatically store end-of-day market data
Speed up back tests by up to 200%
Store fundamental data
Real-time aggregation of tick data into bar data
Replay historical data for back testing
During our benchmark testing, InfluxDB easily handled the storage of 100 billion ticks on a simple laptop.
MongoDB 这个就不多说了,比较常用
收到,我先看一下
本地数据存储方案很多,测试过的HDF5性能确实比较好。 其实这个包能完成基本的网络数据发包解包就很好了,简单的本地存储方案也就几行代码......复杂的就是一个大PROJECT.
盘后的我写的是mongo的 https://github.com/yutiansut/QUANTAXIS/blob/master/QUANTAXIS/QAFetch/QATdx.py 这个是对获取的封装
https://github.com/yutiansut/QUANTAXIS/blob/master/QUANTAXIS/QASU/save_tdx.py 这个是对存储的封装
@zfsamzfsam @solensolen
学习了。记得vnpy也用的是mongo,看来有必要研究下。