  This thesis serves three primary purposes, first of which is to forecast two
stocks, i.e. Goldman Sachs (GS) and General Electric (GE). In order to forecast
stock prices, we used a long short-term memory (LSTM) model in which we
inputted the prices of two other stocks that lie in rather close correlation
with GS. Other models such as ARIMA were used as benchmark. Empirical results
manifest the practical challenges when using LSTM for forecasting stocks. One
of the main upheavals was a recurring lag which we called "forecasting lag".
  The second purpose is to develop a more general and objective perspective on
the task of time series forecasting so that it could be applied to assist in an
arbitrary that of forecasting by ANNs. Thus, attempts are made for
distinguishing previous works by certain criteria (introduced by a review paper
written by Ahmed Tealab) so as to summarise those including effective
information. The summarised information is then unified and expressed through a
common terminology that can be applied to different steps of a time series
forecasting task.
  The last but not least purpose of this thesis is to elaborate on a
mathematical framework on which ANNs are based. We are going to use the
framework introduced in the book "Neural Networks in Mathematical Framework" by
Anthony L. Caterini in which the structure of a generic neural network is
introduced and the gradient descent algorithm (which incorporates
backpropagation) is introduced in terms of their described framework. In the
end, we use this framework for a specific architecture, which is recurrent
neural networks on which we concentrated and our implementations are based. The
book proves its theorems mostly for classification case. Instead, we proved
theorems for regression case, which is the case of our problem.
