← all repositories
JordiCorbilla/stock-prediction-deep-neural-learning

A stock-prediction lab that grades itself against 'tomorrow = today'

A 2020 LSTM-predicts-stock-prices notebook that grew into a research lab built around one uncomfortable question: can the model actually beat the naive last-price baseline?

★689 stars Python Domain AppsML Frameworks
stock-prediction-deep-neural-learning
Not currently ranked.
star history

What it does It trains TensorFlow LSTM models on market history — targeting prices, returns, deltas, or trend residuals — but the real product is quant_forecast_lab, a maintained package for judging those forecasts honestly. Predictions get scored against the naive “tomorrow’s price = today’s price” baseline via RMSE skill, directional accuracy, and a transaction-cost-aware strategy diagnostic. An arena mode compares multiple models, assets, and horizons from already-out-of-sample CSVs and emits a self-contained HTML report with Sharpe-like diagnostics, drawdown, and turnover.

The interesting bit The README states outright that the objective is not a chart that visually hugs the price series — it’s whether a model has out-of-sample skill beyond simple baselines. The repo even publishes its own failure: the v9 return model’s held-out FTSE run did not beat the zero-return baseline on RMSE, and the README says so instead of quietly retiring the model. Candor this specific is roughly as common in the stock-prediction genre as a calibrated confidence interval.

Key highlights

  • RMSE skill (1 - RMSE(model) / RMSE(naive)) reported alongside raw error, so a pretty chart can’t masquerade as forecasting skill.
  • A model lineage from v7 (direction + magnitude, recursive inference) through v8 (shared multi-task LSTM) to v9 (return, direction, and ordered quantile heads).
  • Expanding-window walk-forward splits, deliberately independent of TensorFlow so the evaluation protocol is testable without downloading market data.
  • Reproducibility hygiene: recorded seeds, a saved close-price snapshot with SHA-256 digest, and environment metadata captured per run.
  • Compatibility-first migration — the 2020-era entry points still run with their original semantics while the maintained package grows around them.

Caveats

  • Uncertainty outputs are scenario paths, not calibrated probabilities; the one-step residual band has no validated coverage for recursive multi-session forecasts.
  • The trading diagnostic is intentionally small — no market impact, borrow, financing, or capacity modeling; it is not an execution simulator.
  • Data comes via yfinance, and corporate actions, symbol history, and survivorship are explicitly left as the experimenter’s problem.

Verdict Worth a look if you build or evaluate time-series forecasters and want a working template for baseline-anchored, cost-aware evaluation. Skip it if you wanted a turnkey trading bot — the repo is the first to tell you the model doesn’t obviously beat today’s price.

Frequently asked

What is JordiCorbilla/stock-prediction-deep-neural-learning?
A 2020 LSTM-predicts-stock-prices notebook that grew into a research lab built around one uncomfortable question: can the model actually beat the naive last-price baseline?
Is stock-prediction-deep-neural-learning open source?
Yes — JordiCorbilla/stock-prediction-deep-neural-learning is open source, released under the Apache-2.0 license.
What language is stock-prediction-deep-neural-learning written in?
JordiCorbilla/stock-prediction-deep-neural-learning is primarily written in Python.
How popular is stock-prediction-deep-neural-learning?
JordiCorbilla/stock-prediction-deep-neural-learning has 689 stars on GitHub.
Where can I find stock-prediction-deep-neural-learning?
JordiCorbilla/stock-prediction-deep-neural-learning is on GitHub at https://github.com/JordiCorbilla/stock-prediction-deep-neural-learning.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.