MarketTesting prediction table for AAPL: rows for day +1 to day +90 of predicted close, high, low, open and volume, in the column order of the model output.
MT-02AAPL prediction table, 90-day forecast, from the November 8, 2026 training run. Model output only; not a validated trading result.*

* Run conditions: 12-stock training run, November 8, 2026, code at main 79f6e12. The 90-day forecast uses a sliding window, with each prediction fed back as input.

Project

Overview

MarketTesting downloads daily price history for NASDAQ stocks with yfinance, or reads it from a CSV, segments it into 100-day windows, and trains a two-layer LSTM in TensorFlow to predict the open, high, low, close and volume for the next day. As a learning project, it makes no claims of predictive accuracy.

Key components

  • Data pipeline. The pipeline loads data from yfinance or a CSV file, filters out missing or short datasets and skips tickers that exceed fixed price or scaling thresholds. Every stock is scaled with one shared scaler.
  • Model and training. A Keras LSTM with dropout and early stopping, trained ticker by ticker, including diagnosis of a scaling defect that drove validation loss to NaN.
  • Prediction log and packaging. A DataLog that turns predictions into a day-by-day table, Pylint checks on GitHub Actions, and an installable Python package.
  • Python
  • pandas/NumPy
  • TensorFlow
  • yfinance
Pipeline diagram, top to bottom: CSV or yfinance data, pandas and NumPy preprocessing, RobustScaler feature scaling, 100-day windows, LSTM, prediction table.
MT-01End-to-end pipeline, from raw price data to the prediction table.
Terminal output from a MarketTesting training run, one ticker at a time: per-epoch loss for MSFT, NVDA skipped with a scaled-data message, then AMD.
MT-03Per-ticker training. MSFT shows four of 25 epochs, with validation loss rising from 0.0539 to 0.0641; NVDA is skipped with the message "Scaled data for NVDA is too large!!", and AMD training follows.

Code: Benjamin-Elmore/MarketTesting on GitHub. Described at main 79f6e12.

Next project: CBU Robotics →