Skip to content

matrixorigin/matrixone_python_app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

MatrixOne Stock Analysis Python Application

This is a python application example with MatrixOne. Checkout this tutorial about how to start to build it from ground up.

Usage

  1. Initialization

Install required modules.

pip3 install -r requirements.txt
  1. Load historical data.
# Execute under the matrixone_python_app directory
python3 -m stock_analysis.main fetchData --tushareToken='YOUR_TUSHARE_API_TOKEN'
  1. Find lowest P/E stock.
# Find the lowest P/E after market close on 22nd, April 2022
python3 -m stock_analysis.main findLowPE --tushareToken='YOUR_TUSHARE_API_TOKEN' --tradeDate='20220422'

# Find the lowest P/E on the day if you don't specify tradeDate
python3 -m stock_analysis.main findLowPE --tushareToken='YOUR_TUSHARE_API_TOKEN' 
  1. Find lowest P/B stock.
# Find the lowest P/B after market close on 22nd, April 2022
python3 -m stock_analysis.main findLowPB --tushareToken='YOUR_TUSHARE_API_TOKEN' --tradeDate='20220422'

# Find the lowest P/E on the day if you don't specify tradeDate
python3 -m stock_analysis.main findLowPB --tushareToken='YOUR_TUSHARE_API_TOKEN' 
  1. Update your dataset.
# Update your selected stock data until the most recent
python -m stock_analysis.main fetchData --tushareToken='YOUR_TUSHARE_API_TOKEN' --stockCodes='000001.SZ,600000.SH'


# Update all stock data between a time range
python -m stock_analysis.main fetchData --tushareToken='YOUR_TUSHARE_API_TOKEN' --startDate=20220424 —endDate=20220424

About

A simple stock analysis python application with MatrixOne

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages