This repository provides a Python-based pipeline to train a deep learning model and determine whether today is a potential price bottom for a given Taiwan stock ticker.
Make sure you have Python 3.9 or newer installed.
python3 -m venv venvsource venv/bin/activatevenv\Scripts\activateUpgrade pip first:
pip install --upgrade pipInstall required packages:
pip install -r requirements.txtExecute the main entry script with a Taiwan stock ticker:
python run.py 2317- Downloads historical price data (if not already cached)
- Trains the model (if no checkpoint exists)
- Evaluates the trained model
- Runs inference for today
- Prints whether today is a bottom signal
Ticker: 2412
Predicted reward: -0.6329
Bottom today: False
Bottom strength: -0.1266
- Price data is cached under
data/prices/ - Trained models are saved under
checkpoints/ - Re-running the same ticker will reuse cached data and model
If you want to force retraining, delete the checkpoint file:
rm checkpoints/2317_reward_model.ptThen rerun:
python run.py 2317