How yacoubb/stock-trading-ml works
This repository is a stock-price prediction and trading prototype. Its main workflow downloads price history, transforms it into training examples, trains and evaluates either an OHLCV-only or technical-indicator model, then loads the saved technical model to generate buy/sell signals and estimate earnings. The README documents this sequence. The excerpts show the model and data-processing calls; the download-to-training handoff is documented rather than directly wired in code. The repository does not show a live brokerage integration.
Main entry points: trading_algo.py Signal and earnings analysis · util.py Dataset preparation · save_data_to_csv.py History downloader · basic_model.py OHLCV model
Components 11
Market data
- History downloader
save_data_to_csv.py - Price history CSV
- Dataset preparation
util.py
Modeling
- OHLCV model
basic_model.py - Indicator model
tech_ind_model.py - Basic model file
- Technical model file
Trading analysis
- Signal and earnings analysis
trading_algo.py - Prediction plots
trading_algo.py
Other components
- User
- Alpha Vantage
Connections 14
- User → History downloader: requests history
README.md - History downloader → Alpha Vantage: fetches prices
save_data_to_csv.py - History downloader → Price history CSV: writes CSV
save_data_to_csv.py - Price history CSV → Dataset preparation: provides history
README.md - User → OHLCV model: trains model
README.md - User → Indicator model: trains model
README.md - OHLCV model → Dataset preparation: calls dataset prep
basic_model.py - Indicator model → Dataset preparation: calls dataset prep
tech_ind_model.py - OHLCV model → Basic model file: saves model
basic_model.py - Indicator model → Technical model file: saves model
tech_ind_model.py - User → Signal and earnings analysis: runs analysis
README.md - Signal and earnings analysis → Technical model file: loads model
trading_algo.py - Signal and earnings analysis → Dataset preparation: calls dataset prep
trading_algo.py - Signal and earnings analysis → Prediction plots: plots results
trading_algo.py