Giter Site home page Giter Site logo

stock_code's Introduction

stock_get_data

Data_Preparation: import all the necessary modules and import stock list. Establish connection to local mySQL server

二 配置文件

config/app.conf

#mysql数据库配置 [db] host = localhost port = 3306 database = scorpion user = root pass = 123456 charset = utf8 connect_url = mysql://root:123456@localhost:3306/scorpion

[system] stock_points=60 # 依赖历史数据点 log_path=.

#邮件配置 [email] smtp.server=smtp.163.com port=465 user=[email protected] password=password sender=[email protected] reveiver=[email protected],[email protected] subject=stock测试邮件

三 股票代码配置 config/stock_lists.txt 每一行为一个股票代码,程序只处理配置的股票

四 mysql建表语句 doc/create_sql.sql

五 任务说明

  1. 定时任务类refresh_daily.py

里面配置各种K线数据的更新任务

  1. 邮件发送 common/email.py

  2. 数据处理类 collector/data_preparation.py ,refresh_daily.py会调用这个类

  3. 数据库操作store/db.py

  4. indicator和decision都在data_preparation.py里面

数据更新方式:

设定了一个历史数据依赖点数,比如90,然后从数据库查出来历史第90个点对应的时间,然后按这个时间点为start,去pull数据,然后计算indicator和decision,计算完成之后,只更新90个点之后的数据。并且更新decision表,发送邮件。

stock_code's People

Contributors

850361813 avatar

Watchers

James Cloos 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.