Traditionally most machine learning (ML) models use as input features some observations (samples / examples) but there is no **time** **dimension** in the data.

**Time-series forecasting** models are the models that are capable to **predict** **future values** based on **previously** **observed** **values**. Time-series forecasting is widely used for **non-stationary data**. **Non-stationary data **are called the data whose statistical properties e.g. the mean and standard deviation are not constant over time but instead, these metrics vary over time.

These non-stationary input data (used as input to these models) are usually called **time-series. **Some examples of time-series include the temperature values over time, stock price over time, price of a house over time etc. So, the input is a **signal** (time-series) that is **defined by observations taken sequentially in time**.

**Long short-term memory** (**LSTM**) is an artificial recurrent neural network (RNN) architecture used in the field of deep learning. Unlike standard feedforward neural networks, LSTM has feedback connections. It can not only process single data points (e.g. images), but also entire sequences of data (such as speech or video inputs).

**LSTM models** are able to store information over a period of time.

We are going to build a **multi-layer LSTM recurrent neural network** to **predict** the** last value of a sequence of values** i.e. the AAPL stock price in this example.

*Modules needed: Keras, Tensorflow, Pandas, Scikit-Learn & Numpy*

Let’s **load** the **data** and **inspect** them: