This is a python application example with MatrixOne. Checkout this tutorial about how to start to build it from ground up.
- Initialization
Install required modules.
pip3 install -r requirements.txt
- Load historical data.
# Execute under the matrixone_python_app directory
python3 -m stock_analysis.main fetchData --tushareToken='YOUR_TUSHARE_API_TOKEN'
- 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'
- 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'
- 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