// the find
lilianweng/stock-rnn
Predict stock market prices using RNN model with multilayer LSTM cells + optional multi-stock embeddings.
A 2017 tutorial project demonstrating multilayer LSTM stock price prediction in TensorFlow 1.x, with optional per-stock embeddings for multi-stock training. The author is upfront that this is about learning to build RNNs in TensorFlow, not actually solving stock prediction — which is the right framing.
The blog posts linked in the README are genuinely good explanations of how RNNs work for time-series, written by Lilian Weng who is a serious researcher. The multi-stock embedding idea is conceptually interesting — treating each stock as a learned entity rather than running N independent models. The codebase is small enough to read in an afternoon, which makes it useful as a teaching reference.
Frozen at Python 2.7 and TensorFlow 1.2 — nothing here will run without significant porting work since tf.Session and the old variable scoping APIs are gone in TF2. The Google Finance API used in data_fetcher.py has been dead since 2018, so the data pipeline is broken out of the box. No attempt at proper walk-forward validation — the train/test split almost certainly leaks future data, which is the most common mistake in time-series ML and makes any reported accuracy meaningless. Last commit was 2022 and it was already a museum piece by then.