IDEAS home Printed from https://ideas.repec.org/a/plo/pone00/0227222.html
   My bibliography  Save this article

Forecasting stock prices with long-short term memory neural network based on attention mechanism

Author

Listed:
  • Jiayu Qiu
  • Bin Wang
  • Changjun Zhou

Abstract

The stock market is known for its extreme complexity and volatility, and people are always looking for an accurate and effective way to guide stock trading. Long short-term memory (LSTM) neural networks are developed by recurrent neural networks (RNN) and have significant application value in many fields. In addition, LSTM avoids long-term dependence issues due to its unique storage unit structure, and it helps predict financial time series. Based on LSTM and an attention mechanism, a wavelet transform is used to denoise historical stock data, extract and train its features, and establish the prediction model of a stock price. We compared the results with the other three models, including the LSTM model, the LSTM model with wavelet denoising and the gated recurrent unit(GRU) neural network model on S&P 500, DJIA, HSI datasets. Results from experiments on the S&P 500 and DJIA datasets show that the coefficient of determination of the attention-based LSTM model is both higher than 0.94, and the mean square error of our model is both lower than 0.05.

Suggested Citation

  • Jiayu Qiu & Bin Wang & Changjun Zhou, 2020. "Forecasting stock prices with long-short term memory neural network based on attention mechanism," PLOS ONE, Public Library of Science, vol. 15(1), pages 1-15, January.
  • Handle: RePEc:plo:pone00:0227222
    DOI: 10.1371/journal.pone.0227222
    as

    Download full text from publisher

    File URL: https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0227222
    Download Restriction: no

    File URL: https://journals.plos.org/plosone/article/file?id=10.1371/journal.pone.0227222&type=printable
    Download Restriction: no

    File URL: https://libkey.io/10.1371/journal.pone.0227222?utm_source=ideas
    LibKey link: if access is restricted and if your library uses this service, LibKey will redirect you to where you can use your library subscription to access this item
    ---><---

    References listed on IDEAS

    as
    1. Huicheng Liu, 2018. "Leveraging Financial News for Stock Trend Prediction with Attention-Based Recurrent Neural Network," Papers 1811.06173, arXiv.org.
    2. Diego Ardila & Didier Sornette, 2016. "Dating the Financial Cycle: A Wavelet Proposition," Swiss Finance Institute Research Paper Series 16-29, Swiss Finance Institute, revised May 2016.
    3. Ardila, Diego & Sornette, Didier, 2016. "Dating the financial cycle with uncertainty estimates: a wavelet proposition," Finance Research Letters, Elsevier, vol. 19(C), pages 298-304.
    Full references (including those not matched with items on IDEAS)

    Most related items

    These are the items that most often cite the same works as this one and are cited by the same works as this one.
    1. Tran, Thuy Nhung, 2022. "The Volatility of the Stock Market and Financial Cycle: GARCH Family Models," Jurnal Ekonomi Malaysia, Faculty of Economics and Business, Universiti Kebangsaan Malaysia, vol. 56(1), pages 151-168.
    2. Strohsal, Till & Proaño, Christian R. & Wolters, Jürgen, 2019. "Characterizing the financial cycle: Evidence from a frequency domain analysis," Journal of Banking & Finance, Elsevier, vol. 106(C), pages 568-591.
    3. Saulius Jokubaitis & Dmitrij Celov, 2022. "Business Cycle Synchronization in the EU: A Regional-Sectoral Look through Soft-Clustering and Wavelet Decomposition," Papers 2206.14128, arXiv.org.
    4. Montserrat Reyna Miranda & Ricardo Massa Roldán & Vicente Gómez Salcido, 2022. "Neuro-wavelet Model for price prediction in high-frequency data in the Mexican Stock market," Remef - Revista Mexicana de Economía y Finanzas Nueva Época REMEF (The Mexican Journal of Economics and Finance), Instituto Mexicano de Ejecutivos de Finanzas, IMEF, vol. 17(1), pages 1-23, Enero - M.
    5. C. Colther & J. L. Rojo & R. Hornero, 2022. "A Wavelet Method for Detecting Turning Points in the Business Cycle," Journal of Business Cycle Research, Springer;Centre for International Research on Economic Tendency Surveys (CIRET), vol. 18(2), pages 171-187, July.
    6. Greg Farrell & Esti Kemp, 2020. "Measuring the Financial Cycle in South Africa," South African Journal of Economics, Economic Society of South Africa, vol. 88(2), pages 123-144, June.
    7. Dalia Mansour-Ibrahim, 2023. "Are the Eurozone Financial and Business Cycles Convergent Across Time and Frequency?," Computational Economics, Springer;Society for Computational Economics, vol. 61(1), pages 389-427, January.
    8. Malgorzata Porada - Rochon, 2020. "The Length of Financial Cycle and its Impact on Business Cycle in Poland," European Research Studies Journal, European Research Studies Journal, vol. 0(4), pages 1278-1290.
    9. Zhihan Zhou & Liqian Ma & Han Liu, 2021. "Trade the Event: Corporate Events Detection for News-Based Event-Driven Trading," Papers 2105.12825, arXiv.org, revised May 2021.
    10. Süreyya Özöğür Akyüz & Pınar Karadayı Ataş & Aymane Benkhaldoun, 2024. "Predicting stock market by sentiment analysis and deep learning," Operations Research and Decisions, Wroclaw University of Science and Technology, Faculty of Management, vol. 34(2), pages 85-107.
    11. Saurabh Kamal & Sahil Sharma & Vijay Kumar & Hammam Alshazly & Hany S. Hussein & Thomas Martinetz, 2022. "Trading Stocks Based on Financial News Using Attention Mechanism," Mathematics, MDPI, vol. 10(12), pages 1-30, June.
    12. Martin Mandler & Michael Scharnagl, 2022. "Financial Cycles in Euro Area Economies: A Cross‐Country Perspective Using Wavelet Analysis," Oxford Bulletin of Economics and Statistics, Department of Economics, University of Oxford, vol. 84(3), pages 569-593, June.
    13. Yiqi Deng & Siu Ming Yiu, 2022. "Deep Multiple Instance Learning For Forecasting Stock Trends Using Financial News," Papers 2206.14452, arXiv.org.

    More about this item

    Statistics

    Access and download statistics

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:plo:pone00:0227222. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    If CitEc recognized a bibliographic reference but did not link an item in RePEc to it, you can help with this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: plosone (email available below). General contact details of provider: https://journals.plos.org/plosone/ .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.