Up or down tomorrow?
You see the last 60 trading days of the S&P 500 index or of the Banca Transilvania share (TLV, Bucharest Stock Exchange) and decide: will the next trading day close up or down? After each decision you see the forecast of the recurrent network of Lecture 5 and the real close. All 10 days come from the test period of the lecture (2020 to October 2026), which the network never saw during training.
The network is the LSTM (long short-term memory network) of the lecture: 16 hidden units, it reads the last 22 daily returns and forecasts the next one. It was trained on 2005 to 2016 (TLV: 2008 to 2016) and tuned on 2017 to 2019. The lecture trained five such networks with different seeds; the game shows their average forecast and says 'up' when it is positive. On the S&P 500 test days this average says 'up' on 70.2% of days.
What the game shows
- On all 1,717 S&P 500 test days the LSTM of the lecture gets the direction right on 52.1% of days, on the 1,573 Banca Transilvania test days on 52.9% (mean of the five networks; their average forecast: 53.1% and 53.1%). Answering 'up' every day scores 54.0% and 55.1%.
- The out-of-sample R² (the share of the variance of returns that the forecast explains) of the LSTM is 0.78% for the S&P 500 and 0.21% for TLV: the sign of tomorrow's return is close to a coin flip, for you and for the network.
- What does have memory is the size of the moves (autocorrelation of absolute S&P 500 returns 0.315 at lag 1). This is why the lecture forecasts volatility: there the LSTM cuts the mean squared error of the naive forecast by 35.3%.
Data: S&P 500 adjusted closes (Yahoo Finance) and Banca Transilvania adjusted closes (EODHD, Bucharest Stock Exchange); forecasts: cached LSTM forecasts of analysis_L5.py (lectures/L5/cache/ret.pkl). The 40 days of the game are drawn at random from the test days (20 per series; seed 20261108); every game draws 5 of each series. Code: lectures/L5/make_game_L5.py.

