MunjPatel/LSTM-FinTrends
LSTM-FinTrends is an end-to-end project showcasing stock index direction forecasting using an LSTM model with derived metrics. It demonstrates a complete workflow, from data collection with yfinance to visualization via a Flask app. Automated using GitHub Actions, this project emphasizes the setup and execution of DL in financial forecasting.
What's novel
LSTM-FinTrends is an end-to-end project showcasing stock index direction forecasting using an LSTM model with derived metrics. It demonstrates a complete workflow, from data collection with yfinance to visualization via a Flask app. Automated using GitHub Actions, this project emphasizes the setup and execution of DL in financial forecasting.
Code Analysis
8 files read · 3 roundsFetches 20 years of stock index data via yfinance, computes ~19 derived features, trains a 3-layer LSTM (with timesteps=1, effectively a feedforward network) to predict next-day close direction, saves results to JSON, and displays them via a Flask/Plotly web app.
Strengths
The preprocessing pipeline is reasonably comprehensive with multiple derived features (RSI, rolling stats, lags, pct changes), and the end-to-end workflow from data collection to visualization is complete and functional. The GitHub Actions automation for daily retraining and result persistence is a nice touch.
Weaknesses
The LSTM is used with timesteps=1, completely defeating its purpose for temporal dependencies; the 0.99 classification threshold is arbitrarily extreme and will classify nearly everything as 0; parallel training with ThreadPoolExecutor is unsafe for TensorFlow; there are zero tests; and the code has significant commented-out dead code and design inconsistencies (private methods called externally).
Score Breakdown
Signal breakdown
Innovation
Craft
Traction
Scope
Evidence
Commits
359
Contributors
2
Files
27
Active weeks
51
Repository
Language
Python
Stars
2
Forks
0
License
MIT