Attention based Temporal Convolutional Network for stock price prediction
Summary
Stock prices are notoriously difficult to predict, making it an excellent testing ground for deep learning models. A recent survey however shows that the TCN is rarely used for stock price prediction with exclusively financial data. In this study we will attempt to improve the TCN performance by looking at the effects of adding attention mechanisms to the TCN for forecasting stock prices. We also propose an architecture called the ATCN, a model that combines temporal and hierarchical attention in the TCN framework. Performance of the TCN is compared to models with hierarchical attention (HA-TCN), temporal attention (TCAN) or both (ATCN). We also evaluate the performance of the attention-based models when using a different number of layers. Results indicate that the TCAN performs best on average and that attention-based models need less filters and layers to perform well. We conclude that attention-based models are preferred over the standard TCN due to significantly faster training times and roughly similar performance, with TCAN the clear winner on this dataset. The ATCN shows some potential but needs to be tested further on more complex datasets.