Algorithmic trading with Keras
We use a Long Short Time Memory recurrent neural network to develop a good trading strategy for the S&P 500 index.
we want our model to tell us whether we should stay in the market for the current month or not.
The LSTM-trading-strategy is proven to be far superior to the buy-and-hold strategy (staying always in the market) and the moving average strategy (buying when the price is greater than or equal to the moving average of the last 12 months and selling otherwise) over a period of 4 years, which encompasses the 2008 crisis.
Considering the 2008 crisis, our model produced roughly a 10% net annual yield (since the Italian law taxes capital gains at 26% and charges the broker 0.10%).