JordiCorbilla/stock-prediction-deep-neural-learning

Predicting stock prices using a TensorFlow LSTM (long short-term memory) neural network for times series forecasting

What it solves

It provides a rigorous research environment for financial time-series forecasting, moving beyond simple visual chart tracking to measure whether deep learning models actually possess out-of-sample forecasting skill compared to naive baselines.

How it works

The project uses TensorFlow-based LSTM models to predict price, returns, and trends. It implements several model versions, including a shared multi-task architecture (v8) that predicts both move direction and magnitude simultaneously. To ensure scientific validity, it employs a strict evaluation protocol with separate training, validation, and test sets, utilizing expanding-window walk-forward splits. It also includes a "Financial Forecasting Arena" to compare multiple assets or horizons and a backtesting module to evaluate directional strategies while accounting for transaction costs.

Who it’s for

Quantitative researchers and developers interested in applying deep learning to financial market forecasting and evaluating model performance using rigorous statistical benchmarks.

Highlights

  • Multi-version LSTM Architectures: Supports various models (v7, v8, v9) for price, return, and trend-residual targets.
  • Naive Baseline Benchmarking: Calculates "RMSE skill" to determine if a model beats the simple "tomorrow's price = today's price" baseline.
  • Rigorous Validation: Implements chronological expanding-window splits to prevent data leakage.
  • Trading Diagnostics: Includes tools to calculate annualised returns, Sharpe-like diagnostics, and maximum drawdown with transaction-cost awareness.
  • Reproducibility Suite: Records experiment seeds, runtime metadata, and data hashes to ensure research can be replicated.
  • Uncertainty Estimation: Provides scenario paths and symmetric conformal intervals for one-step prediction residuals.

Related

  • Project
  • Project
  • Project
  • Project