Skip to main content

a tool to read stock factor data for quants

Project description

factor_reader

相关链接

安装

pip install factor_reader

使用

factor_reader目前共包含两个功能:

  1. 查看目前包含哪些因子,以及每个因子的基本信息
  2. 读取某一因子在某段时间上的因子数据

第一步:查看目前数据库中有哪些因子

import factor_reader

# 需要token请与作者联系
token='xxxxxxxxxx'  
info=factor_reader.show_all_factors_information(token)

第二步:读取某个因子在某个时间段的数据

import factor_reader

# 需要token请与作者联系
token='xxxxxxxxxx' 

# 读取键名为factor1的因子在2013年1月1日至2022年12月31日间的因子数据
data1=factor_reader.read_factor('factor1',token=token,start_date=20130101,end_date=20221231) 

# 读取键名为factor4的因子在2023年1月13日的因子数据
data2=factor_reader.read_factor('factor4',token=token,trade_date=20230113) 

# 读取键名为factor5的因子全部的因子数据
data3=factor_reader.read_factor('factor5',token=token) 

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

factor_reader-0.0.4.tar.gz (14.8 kB view hashes)

Uploaded Source

Built Distribution

factor_reader-0.0.4-py3-none-any.whl (11.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page