Skip to content

xingetouzi/fxdayu_data

Repository files navigation

fxdayu_data

fxdayu_data是用于本地数据读取的工具包,可通过该工具包实现对特定结构数据进行便捷快速的读取。

QuickStart

下载数据

从百度云下载数据压缩包并解压。

链接 http://pan.baidu.com/s/1c2q5EWK
密码 cvz3

解压得到如下图所示目录,其中BundleConfig.py是要添加的配置文件。

data

使用pip安装fxdayu_data

pip install fxdayu_data

添加配置文件并使用

  • 进入解压的目录可以看到BundleConfig.py文件,将该文件的绝对路径记为PATH。

  • 使用DataAPI添加配置文件,命名为bundle并设为默认配置。

DataAPI add -n bundle PATH
DataAPI use bundle

测试

读取数据包中000001.XSHE 2017年8月的数据。

  • 在cmd或terminal中测试
DataAPI exec candle 000001.XSHE D start=2017-08-01 end=2017-09-01
  • 在python中测试
from fxdayu_data import DataAPI
print(
    DataAPI.candle("000001.XSHE", "D", start='2017-08-01', end='2017-09-01')
)

输出结果:

                       close     high      low     open     volume
datetime
2017-08-01 15:00:00  11.0399  11.0800  10.6000  10.6400  203570900
2017-08-02 15:00:00  11.1500  11.3400  10.9600  11.0500  206206900
2017-08-03 15:00:00  11.0100  11.2200  10.9700  11.1400   98421900
2017-08-04 15:00:00  11.1700  11.2899  10.9300  10.9900   70533200
2017-08-07 15:00:00  11.0000  11.1600  10.9000  11.0600   40745800
2017-08-08 15:00:00  11.0500  11.1100  10.9100  10.9900   34675100
2017-08-09 15:00:00  10.7300  11.0100  10.6800  10.9700   53595400
2017-08-10 15:00:00  10.6199  10.8200  10.5500  10.6800   47426700
2017-08-11 15:00:00  10.0200  10.5399   9.9900  10.4700  124408800
2017-08-14 15:00:00  10.2200  10.2500  10.0500  10.1300   56646900
2017-08-15 15:00:00  10.3100  10.5100  10.2200  10.2300   55074600
2017-08-16 15:00:00  10.3400  10.3699  10.1500  10.2800   37164700
2017-08-17 15:00:00  10.4200  10.4200  10.2899  10.3400   30526400
2017-08-18 15:00:00  10.4400  10.5600  10.2899  10.3500   32943100
2017-08-21 15:00:00  10.4600  10.5100  10.3900  10.4400   20811000
2017-08-22 15:00:00  10.6500  10.6600  10.3800  10.4800   46029900
2017-08-23 15:00:00  10.9000  10.9800  10.5900  10.6000   71398300
2017-08-24 15:00:00  10.9300  11.1000  10.8400  10.8900   44670100
2017-08-25 15:00:00  11.1100  11.1700  10.9000  10.9300   53214300
2017-08-28 15:00:00  11.3500  11.5399  11.1600  11.1600   80474000
2017-08-29 15:00:00  11.6700  11.7300  11.2800  11.2800   68976500
2017-08-30 15:00:00  11.4300  11.7000  11.3600  11.6700   56417200
2017-08-31 15:00:00  11.2800  11.4400  11.1500  11.3699   58377400

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published