Skip to content

ShotoZhao/Stockauto

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

About this mini project

  • it is time consuming and arduous to find out an expected stock from China A stock market containing nearly 3000 stocks.

    this mini project can choose expected stocks automaticlly depending on criterion you've settled.

Dependencies

  • this project denpends on FuTu API from which you can get stock data.
  • you need to install MongoDB where store the stock data and send the data.
  • this project is based on python 2.7. unknown error may appear in python 3.x.

Usage

  1. after you've set up FuTu API, there is a sample.py in the package. i've modified it so that the stock data can stored in MongoDB. Using the function _example_hist_kline() in this file to get the stock data and the data will be stored in Mongodb because there is a function importing from stock_mongo.py. for more info about the usage of this API, please refer the API directions.
  2. stock_index.py and stock_list2 are stock code lists of A stock market. the first is used in FUTU API, the second is used in other function of this project e.g. the function of getting data from Mongodb.
  3. stock_data_treatment.py can calculate average price, average volume, macd and so on. you can add some functions in it according to your requirements. but in this version, i integrate this function into stock_pands.py.
  4. stock_pandas.py is the primary file within which you can choose the wanted stock from 3000 stocks automatically. and the data_treatment function is also integrated into this file. there is only one sample strategy about macd saying that if diff cross over dea, i put it into macd_up list otherwise macd_down list. you can write your strategies in this file.
  5. stockcandle.py is used to plot k-line by day. just for fun. enjoy it if you like.
  6. replace sample.py and copy the files into FUTU API folder.

Others

  • this project is a basic version, so you can modify it as you wish. For instance, you can calculate more features such as RSI, Boll band and so on.
  • any question is welcome. Please write a comment or contact me.
  • if you get some help from this project, please Star it on the top-right corner. Thank you.

About

filter stock from China A stock market

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy