Giter Site home page Giter Site logo

ginkgo's Introduction

ginkgo

股票行情数据本地化存储、并进行一些指标形态计算。 目前行情基于tushare

1.安装

源码安装

git clone [email protected]:fsksf/ginkgo.git
cd ginkgo
pip install .

命令介绍

Usage: ginkgo  COMMAND [OPTIONS] [ARGS]...

Options:
  -h, --help  请选择要执行的command

Commands:
  calc-classical    # 经典形态选股
  gen-config        # 获取默认配置到用户家目录
  quote-init        # 行情数据初始化
  quote-update      # 行情数据更新

使用本地数据源

from ginkgo.data_local.data_proxy import DataProxy
dp = DataProxy()
# 获取一段时间的交易日历
dp.get_calendar(start_date, end_date)
# 获取symbol, 支持过滤
dp.get_symbols(industry=None, area=None, board=None, symbol=True)
# 从start_date 偏移几个交易日历天, 整数向前偏移 ,负数向后偏移
dp.get_date_offset(start_date, bar_cunt)
# 获取一个symbol的历史数据, 返回自定义Frame类型, 可以使用to_dataframe 转为pandas.DataFrame
dp.get_daily_hist(symbol, start_date, end_date, fields_list=None, br=False)
# 获取多个symbol的历史数据, 返回自定义SFrame类型, 可以使用to_dataframe 转为pandas.DataFrame
dp.get_daily_hists(symbols, start_date, end_date, fields_list=None, br=False)

ginkgo's People

Contributors

ruyisee avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.