<abstract> <p>The ability to predict stock-market indices is important to investors and financial decision-makers. However, the uncertainty of available information makes accurate prediction extremely challenging. In this work, we propose and validate a multi-level stacking model of long short-term memory (LSTM) units for the short-term prediction of stock-index closing prices. The proposed machine-learning model is trained using historical data to predict next-day closing prices. The first layer of the multi-level stacked structure contains an ensemble of recurrent LSTM models that receives time-series data of historic opening, closing, high and low prices for current and previous days and outputs predictions about the next day's closing prices. The second and third layers consist of stacked multi-layer perceptron meta-models. We validated the new model on two stock indices, demonstrating its advantages over single-LSTM models. We also compared its performance against several extant statistical and machine-learning models on a subset of Standard &amp; Poor's 500 index data between 2000 and 2016 using correlation and statistical metrics.</p> </abstract>