GithubHelp home page GithubHelp logo

evilxiemeng / stock-sky Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jumper2014/stock-sky

0.0 2.0 0.0 386 KB

股票历史数据采集,存储到csv,MySQL,画K线图和成交量图,根据策略预测涨跌,选股

Python 100.00%

stock-sky's Introduction

股票天空

  • 获取股票数据
  • 存储到csv, MySQL数据库
  • 根据历史数据筛选股票

安装和依赖

  • MySQL数据库, 数据库名stock, 用户名密码为root/123456
  • Python 2.7
  • PipEnv(可选,建议安装,避免环境版本冲突和权限问题)
  • tushare
  • lxml, pandas, requests, bs4 (支持tushare, 建议从pipenv命令行安装)
  • export PATH=$PATH:/usr/local/mysql/bin; pip install mysql-python
  • configparser
  • pyecharts, 它是一个用于生成 Echarts 图表的类库。Echarts 是百度开源的一个数据可视化 JS 库。主要用于数据可视化。
  • 建议使用清华的源 pip install -i https://pypi.tuna.tsinghua.edu.cn/simple

获取股票数据

  • python libs/data/mysql_writer.py : 获取股票数据存储到MySQL
  • python libs/data/csv_writer.py : 获取股票数据存储到MySQL
  • python misc/tool/stock_code_spider/stock_code_spider.py: 抓取股票代码和名称,写入同目录data.csv
  • python kline.py: 生成股票K线图

如何使用

  • 抓取数据到MySQL: python main -t msql
  • 抓取数据到CSV: python main -t csv
  • 性能:500秒抓取3500只股票三年的数据

筛选股票

  • TODO

开发计划

  • todo: 展示均线
  • todo: 从构建MongoDB数据结构
  • todo: 读写MongoDB的库
  • todo: 构建测试程序

  • done: 简单移动平均线选股-从tushare接口
  • done: 简单移动平均线选股-从MySQL数据库
  • done: 通过线程池批量下载历史数据
  • done: 使用从tushare获得的股票代码代替从东方财富网获得股票代码
  • done: 数据存储到csv
  • done: 展示K线图
  • done: 展示成交量图
  • done: 股票代码和名称获取
  • done: 日数据存储到MySQL
  • done: Mac OS 安装MySQL
  • done: Python 2.7环境
  • done: PipEnv结合PyCharm
  • done: 安装第三方库和依赖

感谢

stock-sky's People

Contributors

jumper2014 avatar

Watchers

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