  Forecasting stock prices can be interpreted as a time series prediction
problem, for which Long Short Term Memory (LSTM) neural networks are often used
due to their architecture specifically built to solve such problems. In this
paper, we consider the design of a trading strategy that performs portfolio
optimization using the LSTM stock price prediction for four different
companies. We then customize the loss function used to train the LSTM to
increase the profit earned. Moreover, we propose a data driven approach for
optimal selection of window length and multi-step prediction length, and
consider the addition of analyst calls as technical indicators to a multi-stack
Bidirectional LSTM strengthened by the addition of Attention units. We find the
LSTM model with the customized loss function to have an improved performance in
the training bot over a regressive baseline such as ARIMA, while the addition
of analyst call does improve the performance for certain datasets.
