IdeaCredIdeaCred

MunjPatel/LSTM-FinTrends

55

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 rounds

Fetches 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

Innovation
3 (25%)
Craft
52 (35%)
Traction
11 (15%)
Scope
57 (25%)

Signal breakdown

Innovation

Not Fork+1
Code Novelty+0
Concept Novelty+0

Craft

Ci+5
Tests-5
Polish+0
Releases-2
Has License+5
Code Quality+12
Readme Quality+15
Recent Activity+7
Structure Quality+5
Commit Consistency+5
Has Dependency Mgmt+5

Traction

Forks+0
Stars+6
Hn Points+0
Watchers+3
Early Traction+0
Devto Reactions+0
Community Contribs+2

Scope

Commits+8
Languages+5
Subsystems+5
Bloat Penalty+0
Completeness+7
Contributors+6
Authored Files+8
Readme Code Match+3
Architecture Depth+5
Implementation Depth+8

Evidence

Commits

359

Contributors

2

Files

27

Active weeks

51

TestsCI/CDREADMELicenseContributing

Repository

Language

Python

Stars

2

Forks

0

License

MIT