Title | Algorithmic Trading Using Long Short-Term Memory Network and Portfolio Optimization |
Authors | Lucato, Ricardo, Jiminez, Edgar, Rocha, Eduardo Salavador, Qi, Yang, Gavrilyuk, Marina and Drumond, Rafael Rego |
Year | 2020 |
Volume | Archives of Data Science, Series A 6(2) / 2020 |
Abstract | Investors typically rely on a mix of experience, intuition, knowledge of economic fundamentals and real-time information to make informed choices and try to get as high a rate of return as possible. Their decisions are customarily more instinct-driven than methodical. Propelled by the need for numerically inspired judgments, ever stronger within the financial community, in recent years the usage of computational and mathematical tools has been taking root. In this work we used a Long Short-Term Memory (LSTM) Network trained on historical prices to predict future daily closing prices of several stocks listed on the Standard & Poor 500 (S&P500) index. We compared the predictions of our LSTM network with those produced by another state-of-the-art approach, the Hidden Markov Model (HMM), in order to validate our findings. We then fed our forecasts into a Markowitz Portfolio Optimization (PO) procedure to identify the best trading strategy. The purpose of PO, which allows for simultaneous and optimal trading of multiple stocks, is to compute a set of daily weights representing the portion of initial capital to be invested in each company. Our empirical results highlight two facts: Firstly, our LSTM model achieves higher accuracy than the standard HMM approach. Secondly, by trading various stocks at the same time we can obtain a higher rate of return than is possible by using the single stock strategy, while also greatly enhancing the real-world applicability of our model. |