跳到主要內容

簡易檢索 / 詳目顯示

研究生: 李謦伊
論文名稱: Currency Exchange Rate Prediction with Long Short Term Memory Networks based on Attention and News Sentiment Analysis
指導教授: 黃楓南
Feng-Nan Hwang
張嘉惠
Chia-Hui Chang
口試委員:
學位類別: 碩士
Master
系所名稱: 理學院 - 數學系
Department of Mathematics
論文出版年: 2019
畢業學年度: 107
語文別: 英文
論文頁數: 61
中文關鍵詞: 預測匯率
外文關鍵詞: Currency Exchange Rate Prediction, Long Short-Term Memory based on Attention, News Sentiment Analysis
相關次數: 點閱:13下載:0
分享至:
查詢本校圖書館目錄 查詢臺灣博碩士論文知識加值系統 勘誤回報
  • 匯率預測是典型的時間序列預測問題,其通過使用歷史數據由自回歸整合移動平均(ARIMA)、季節性ARIMA以及人工神經網絡(ANN)與長短期記憶(LSTM)進行建模。
    在本研究中,我們將討論LSTM變體,LSTM attention的匯率預測表現。我們將實驗分為三個部分:預測貨幣匯率、預測貨幣匯率的趨勢、嘗試預測更長的一天的匯率。為了更好地預測澳幣兌美元的匯率,我們進一步增加了基於SnowNLP庫的新聞文章的情緒分析以及提及澳幣上漲的新聞文章的簡單關鍵詞匹配。我們還比較了使用不同維度的輸入特徵的預測表現,例如7天、30天和60天以及不同的輸入特徵的組合,例如歷史數據、差異和比率。此外,我們使用兩種不同的策略來預測更遠的未來並比較效能。我們的實驗結果表明,將新聞文章的情緒分析添加為特徵可以降低至少15%的預測誤差。與僅使用歷史數據的效能相比,使用匯率及匯率比率的預測效能降低了12%的預測誤差,但是使用匯率及匯率差分並沒有對預測匯率有所貢獻。以及使用7天輸入的預測效能優於其他天的輸入的預測效能。最後,我們比較了不同方法的匯率預測效能,LSTM attention加入新聞的情感分析的效能優於其他方法。


    Exchange rate prediction is a typical time series prediction problem which has been modeled by Autoregressive integrated moving average (ARIMA), Seasonal ARIMA as well as Artificial neural networks (ANN) such as Long Short-Term Memory (LSTM) using historical data. In this study, we will discuss the exchange rate prediction of the variant of LSTM, LSTM based on attention. We divide our experiments into three parts, predict currency exchange rates, predict the trends of currency exchange rate, and try to predict exchange rates for a longer day. To better predict the exchange rate of the Australian dollar against the US dollar, we have further added the sentiment analysis of the news articles based on SnowNLP library as well as simple keyword matching on news articles that mention the rise in the Australian dollar. We also compare the performance of using different sizes of input features, such as 7 days, 30 days and 60 days, as well as the different combinations of features, such as historical data, differences and ratios. In addition, we use two different strategies to predict a farther future and compare the performance.
    Our experimental results show that adding sentiment analysis of the news articles as features can reduce prediction error by at least 15\%. The exchange rate prediction performance of using rate ratio is reduced by the test error of 12\%, compared to the performance using only historical data, but the use of the difference as our feature does not contribute to the prediction. The performance of using 7-day input is superior to the other inputs. Finally, we compared the exchange rate prediction performance of different methods, LSTM based on attention with news sentiment analysis outperforms other methods.

    1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 2 Related works . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 2.1 Traditional time series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 2.1.1 Autoregressive Integrated Moving Average model (ARIMA) . . . . 6 2.1.2 Seasonal Autoregressive Integrated Moving Average model (SARIMA) 8 2.1.3 Flow chart of ARIMA and SARIMA . . . . . . . . . . . . . . . . . 9 2.2 Artificial neural networks (ANN) . . . . . . . . . . . . . . . . . . . . . . . 9 3 Methodology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 3.1 Long Short-Term Memory (LSTM) . . . . . . . . . . . . . . . . . . . . . . 11 3.1.1 Network architectures . . . . . . . . . . . . . . . . . . . . . . . . . 12 3.2 Long Short-Term Attention (LSTM attention) . . . . . . . . . . . . . . . . 13 3.3 Sentiment Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 3.4 Two strategies to predict a long-term exchange price . . . . . . . . . . . . 14 4 Numerical results and discussions . . . . . . . . . . . . . . . . . . . . . . . 16 4.1 Data description and tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 4.2 Learning curve . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 4.3 The next day exchange rate prediction . . . . . . . . . . . . . . . . . . . . 19 4.4 The next day trend prediction . . . . . . . . . . . . . . . . . . . . . . . . . 27 4.5 A performance comparison of different methods . . . . . . . . . . . . . . . 30 4.6 The longer day prediction (the next 2/ 4/ 7/ 14/ 30 days) . . . . . . . . . 33 5 Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46

    [1] F.-M. Tseng, G.-H. Tzeng, H.-C. Yu, and B. J. Yuan. Fuzzy ARIMA model for
    forecasting the foreign exchange market. Fuzzy sets and systems, 118:9–19, 2001.
    [2] F. C. Maria and D. Eva. Exchange rates forecasting: Exponential smoothing techniques
    and ARIMA models. Annals of Faculty of Economics, 1:499–508, 2011.
    [3] S.T. Appiah and I.A. Adetunde. Forecasting exchange rate between the ghana cedi
    and the us dollar using time series analysis. Current research journal of economic
    theory, 3:76–83, 2011.
    [4] E. H. Etuk and B. Natamba. Modelling monthly Ugandan Shilling/US dollar exchange
    rates by seasonal Box-Jenkins techniques. International Journal of Life Science
    and Engineering, 1:165–170, 2015.
    [5] O. V. Kryuchin, A. A. Arzamastsev, and K. G. Troitzsch. The prediction of currency
    exchange rates using Artificial Neural Networks. Fachbereich Informatik,, 2011.
    [6] S. K. Chandar, M. Sumathi, and S.N. Sivanandam. Performance comparison of Artificial
    Neural Network techniques for foreign exchange rate forecasting. International
    Journal of Applied Engineering Research, 9:27433–27455, 2014.
    [7] S. Galeshchuk. Neural networks performance in exchange rate prediction. Neurocomputing,
    172:446–452, 2016.
    [8] J. Kamruzzaman and R. A. Sarker. Forecasting of currency exchange rates using
    ANN: A case study. In International Conference on Neural Networks and Signal
    Processing, 2003. Proceedings of the 2003, volume 1, pages 793–797. IEEE, 2003.
    [9] S. Ranjit, S. Shrestha, S. Subedi, and S. Shakya. Comparison of algorithms in foreign
    exchange rate prediction. In 2018 IEEE 3rd International Conference on Computing,
    Communication and Security, pages 9–13. IEEE, 2018.
    [10] S. Galeshchuk and S. Mukherjee. Deep networks for predicting direction of change in
    foreign exchange rates. Intelligent Systems in Accounting, Finance and Management,
    24:100–110, 2017.
    [11] S. Galeshchuk and S. Mukherjee. Deep learning for predictions in emerging currency
    markets. In International Conference on Agents and Artificial Intelligence, pages
    681–686, 2017.
    [12] S. McNally, J. Roche, and S. Caton. Predicting the price of bitcoin using machine
    learning. In 2018 26th Euromicro International Conference on Parallel, Distributed
    and Network-based Processing, pages 339–343. IEEE, 2018.
    [13] S. S. Ozturk and K. Ciftci. A sentiment analysis of twitter content as a predictor of
    exchange rate movements. Review of Economic Analysis, 6:132–140, 2014.
    [14] I. Georgoula, D. Pournarakis, C. Bilanakos, D. Sotiropoulos, and G. M. Giaglis.
    Using time-series and sentiment analysis to detect the determinants of bitcoin prices.
    page 20, 2015.
    [15] S. Deng, T. Mitsubuchi, K. Shioda, T. Shimada, and A. Sakurai. Combining technical
    analysis with sentiment analysis for stock price prediction. In 2011 IEEE Ninth
    International Conference on Dependable, Autonomic and Secure Computing, pages
    800–807. IEEE, 2011.
    [16] Y. Liu, Z. Qin, P. Li, and T. Wan. Stock volatility prediction using recurrent neural
    networks with sentiment analysis. In International Conference on Industrial,
    Engineering and Other Applications of Applied Intelligent Systems, pages 192–201.
    Springer, 2017.
    [17] Qun Zhuge, L. Xu, and G. Z. LSTM neural network with emotional analysis for
    prediction of stock price. Engineering Letters, 25, 2017.
    [18] Y. Wang, M. Huang, L. Zhao, and X. Zhu. Attention-based LSTM for aspect-level
    sentiment classification. In Proceedings of the 2016 Conference on Empirical Methods
    in Natural Language Processing, pages 606–615, 2016.
    [19] J. Ba, V. Mnih, and K. Kavukcuoglu. Multiple object recognition with visual attention.
    arXiv preprint arXiv:1412.7755, 2014.
    [20] K. Gregor, I. Danihelka, A. Graves, D. J. Rezende, and D. Wierstra. Draw: A
    recurrent neural network for image generation. arXiv preprint arXiv:1502.04623,
    2015.
    [21] R. Adhikari and R. K. Agrawal. An introductory study on time series modeling and
    forecasting. arXiv preprint arXiv:1302.6613, 2013.
    [22] J. Marriott and P. Newbold. Bayesian comparison of ARIMA and stationary ARMA
    models. International Statistical Review, 66:323–336, 1998.
    [23] A. Tealab, H. Hefny, and A. Badr. Forecasting of nonlinear time series using ANN.
    Future Computing and Informatics Journal, 2:39–47, 2017.
    [24] W. Bao, J. Yue, and Y. Rao. A deep learning framework for financial time series
    using stacked autoencoders and long-short term memory. Public Library of Science
    one, 12:e0180944, 2017.
    [25] Snownlp, 2015. https://pypi.org/project/snownlp/.
    [26] Keras, 2015. https://keras.io.

    QR CODE
    :::