GithubHelp home page GithubHelp logo

awesome-archive / sequoia Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sngyai/sequoia

0.0 1.0 0.0 21.55 MB

A股自动选股程序,实现了海龟交易法则、缠中说禅牛市买点,以及其他若干种技术形态

Python 100.00%

sequoia's Introduction

Sequoia选股系统

简介

本程序使用传统的TuShare接口,并非需要捐赠的pro接口,获取数据无限制;

另,由于TuShare的增量更新接口有bug(最近一个交易日的数据获取不到),所以每次计算前都是删除所有数据,全部重新获取。

本程序实现了若干种选股策略,大家可以自行选择其中的一到多种策略组合使用,参见work_flow.py

各策略中的end_date参数主要用于回测。

安装依赖:

根据不同的平台安装TA-Lib程序

推荐使用Python3.5以上以及pip3

Python 依赖:

pip install -r requirements.txt 

运行

本地运行

$ python main.py

运行结果查看日志文件sequoia.log 也可参考notice.py模块,自行实现推送相关的功能

服务器端运行

用户也可以将本程序作为定时任务运行在服务端,需要做以下工作:

  • 注释掉main.py的L26-L27;
  • 打开main.py中L13-L24的注释;
  • notice.py模块中实现自己的推送功能,每天定时将选股结果推送到手机上。服务端推荐使用ejabberd,客户端Android推荐使用Conversations,iOS没有开发者证书的话推送不了,有证书推荐使用ChatSecure-iOS ,我采用的推送方案是ejabberd搭配Conversations。 效果如图

statistics strategy

如何回测

修改work_flow.py#L45为指定日期,格式如'2019-06-17'

sequoia's People

Contributors

sngyai avatar yipko 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.