IDEAS home Printed from https://ideas.repec.org/p/arx/papers/2107.09055.html
   My bibliography  Save this paper

Stock price prediction using BERT and GAN

Author

Listed:
  • Priyank Sonkiya
  • Vikas Bajpai
  • Anukriti Bansal

Abstract

The stock market has been a popular topic of interest in the recent past. The growth in the inflation rate has compelled people to invest in the stock and commodity markets and other areas rather than saving. Further, the ability of Deep Learning models to make predictions on the time series data has been proven time and again. Technical analysis on the stock market with the help of technical indicators has been the most common practice among traders and investors. One more aspect is the sentiment analysis - the emotion of the investors that shows the willingness to invest. A variety of techniques have been used by people around the globe involving basic Machine Learning and Neural Networks. Ranging from the basic linear regression to the advanced neural networks people have experimented with all possible techniques to predict the stock market. It's evident from recent events how news and headlines affect the stock markets and cryptocurrencies. This paper proposes an ensemble of state-of-the-art methods for predicting stock prices. Firstly sentiment analysis of the news and the headlines for the company Apple Inc, listed on the NASDAQ is performed using a version of BERT, which is a pre-trained transformer model by Google for Natural Language Processing (NLP). Afterward, a Generative Adversarial Network (GAN) predicts the stock price for Apple Inc using the technical indicators, stock indexes of various countries, some commodities, and historical prices along with the sentiment scores. Comparison is done with baseline models like - Long Short Term Memory (LSTM), Gated Recurrent Units (GRU), vanilla GAN, and Auto-Regressive Integrated Moving Average (ARIMA) model.

Suggested Citation

  • Priyank Sonkiya & Vikas Bajpai & Anukriti Bansal, 2021. "Stock price prediction using BERT and GAN," Papers 2107.09055, arXiv.org.
  • Handle: RePEc:arx:papers:2107.09055
    as

    Download full text from publisher

    File URL: http://arxiv.org/pdf/2107.09055
    File Function: Latest version
    Download Restriction: no
    ---><---

    References listed on IDEAS

    as
    1. Hedayati , Amin & Hedayati , Moein & Esfandyari, Morteza, 2016. "Stock market index prediction using artificial neural network," Journal of Economics, Finance and Administrative Science, Universidad ESAN, vol. 21(41), pages 89-93.
    2. Mojtaba Nabipour & Pooyan Nayyeri & Hamed Jabani & Amir Mosavi, 2020. "Deep learning for Stock Market Prediction," Papers 2004.01497, arXiv.org.
    3. Pekka Malo & Ankur Sinha & Pekka Korhonen & Jyrki Wallenius & Pyry Takala, 2014. "Good debt or bad debt: Detecting semantic orientations in economic texts," Journal of the Association for Information Science & Technology, Association for Information Science & Technology, vol. 65(4), pages 782-796, April.
    Full references (including those not matched with items on IDEAS)

    Citations

    Citations are extracted by the CitEc Project, subscribe to its RSS feed for this item.
    as


    Cited by:

    1. Jingyi Gu & Fadi P. Deek & Guiling Wang, 2023. "Stock Broad-Index Trend Patterns Learning via Domain Knowledge Informed Generative Network," Papers 2302.14164, arXiv.org.
    2. Yuze Lu & Hailong Zhang & Qiwen Guo, 2023. "Stock and market index prediction using Informer network," Papers 2305.14382, arXiv.org.
    3. Liping Wang & Jiawei Li & Lifan Zhao & Zhizhuo Kou & Xiaohan Wang & Xinyi Zhu & Hao Wang & Yanyan Shen & Lei Chen, 2023. "Methods for Acquiring and Incorporating Knowledge into Stock Price Prediction: A Survey," Papers 2308.04947, arXiv.org.
    4. Paul Bilokon & Yitao Qiu, 2023. "Transformers versus LSTMs for electronic trading," Papers 2309.11400, arXiv.org.
    5. Jinan Zou & Qingying Zhao & Yang Jiao & Haiyao Cao & Yanxi Liu & Qingsen Yan & Ehsan Abbasnejad & Lingqiao Liu & Javen Qinfeng Shi, 2022. "Stock Market Prediction via Deep Learning Techniques: A Survey," Papers 2212.12717, arXiv.org, revised Feb 2023.
    6. Yanzhao Zou & Dorien Herremans, 2022. "PreBit -- A multimodal model with Twitter FinBERT embeddings for extreme price movement prediction of Bitcoin," Papers 2206.00648, arXiv.org, revised Oct 2023.
    7. Fateme Shahabi Nejad & Mohammad Mehdi Ebadzadeh, 2023. "Stock market forecasting using DRAGAN and feature matching," Papers 2301.05693, arXiv.org.
    8. Duygu Ider & Stefan Lessmann, 2022. "Forecasting Cryptocurrency Returns from Sentiment Signals: An Analysis of BERT Classifiers and Weak Supervision," Papers 2204.05781, arXiv.org, revised Mar 2023.

    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. Yiyang Zheng, 2022. "Neural Network and Order Flow, Technical Analysis: Predicting short-term direction of futures contract," Papers 2203.12457, arXiv.org.
    2. Jessie Sun, 2019. "A Stock Selection Method Based on Earning Yield Forecast Using Sequence Prediction Models," Papers 1905.04842, arXiv.org.
    3. Caporale, Guglielmo Maria & Gil-Alana, Luis Alberiko & Poza, Carlos, 2022. "The COVID-19 pandemic and the degree of persistence of US stock prices and bond yields," The Quarterly Review of Economics and Finance, Elsevier, vol. 86(C), pages 118-123.
    4. Jeonghwa Cha & Kyungbo Park & Hangook Kim & Jongyi Hong, 2023. "Crisis Index Prediction Based on Momentum Theory and Earnings Downside Risk Theory: Focusing on South Korea’s Energy Industry," Energies, MDPI, vol. 16(5), pages 1-20, February.
    5. Kirtac, Kemal & Germano, Guido, 2024. "Sentiment trading with large language models," Finance Research Letters, Elsevier, vol. 62(PB).
    6. Chen, Cathy Yi-Hsuan & Fengler, Matthias R. & Härdle, Wolfgang Karl & Liu, Yanchu, 2022. "Media-expressed tone, option characteristics, and stock return predictability," Journal of Economic Dynamics and Control, Elsevier, vol. 134(C).
    7. Janusz Gajda & Rafał Walasek, 2020. "Fractional differentiation and its use in machine learning," Working Papers 2020-32, Faculty of Economic Sciences, University of Warsaw.
    8. Paola Cerchiello & Giancarlo Nicola, 2018. "Assessing News Contagion in Finance," Econometrics, MDPI, vol. 6(1), pages 1-19, February.
    9. Zefan Dong & Yonghui Zhou, 2024. "A Novel Hybrid Model for Financial Forecasting Based on CEEMDAN-SE and ARIMA-CNN-LSTM," Mathematics, MDPI, vol. 12(16), pages 1-16, August.
    10. Travis Adams & Andrea Ajello & Diego Silva & Francisco Vazquez-Grande, 2023. "More than Words: Twitter Chatter and Financial Market Sentiment," Papers 2305.16164, arXiv.org.
    11. Chandan Singh & Armin Askari & Rich Caruana & Jianfeng Gao, 2023. "Augmenting interpretable models with large language models during training," Nature Communications, Nature, vol. 14(1), pages 1-11, December.
    12. Xiao-Yang Liu & Guoxuan Wang & Hongyang Yang & Daochen Zha, 2023. "FinGPT: Democratizing Internet-scale Data for Financial Large Language Models," Papers 2307.10485, arXiv.org, revised Nov 2023.
    13. Borchert, Philipp & Coussement, Kristof & De Weerdt, Jochen & De Caigny, Arno, 2024. "Industry-sensitive language modeling for business," European Journal of Operational Research, Elsevier, vol. 315(2), pages 691-702.
    14. Duygu Ider & Stefan Lessmann, 2022. "Forecasting Cryptocurrency Returns from Sentiment Signals: An Analysis of BERT Classifiers and Weak Supervision," Papers 2204.05781, arXiv.org, revised Mar 2023.
    15. Moritz Scherrmann, 2023. "Multi-Label Topic Model for Financial Textual Data," Papers 2311.07598, arXiv.org.
    16. Bledar Fazlija & Pedro Harder, 2022. "Using Financial News Sentiment for Stock Price Direction Prediction," Mathematics, MDPI, vol. 10(13), pages 1-20, June.
    17. David M. Goldberg & Nohel Zaman & Arin Brahma & Mariano Aloiso, 2022. "Are mortgage loan closing delay risks predictable? A predictive analysis using text mining on discussion threads," Journal of the Association for Information Science & Technology, Association for Information Science & Technology, vol. 73(3), pages 419-437, March.
    18. Heni Boubaker & Giorgio Canarella & Rangan Gupta & Stephen M. Miller, 2023. "A Hybrid ARFIMA Wavelet Artificial Neural Network Model for DJIA Index Forecasting," Computational Economics, Springer;Society for Computational Economics, vol. 62(4), pages 1801-1843, December.
    19. Ehsan Hoseinzade & Saman Haratizadeh & Arash Khoeini, 2019. "U-CNNpred: A Universal CNN-based Predictor for Stock Markets," Papers 1911.12540, arXiv.org.
    20. Paola Cerchiello & Giancarlo Nicola & Samuel Rönnqvist & Peter Sarlin, 2017. "Deep Learning Bank Distress from News and Numerical Financial Data," DEM Working Papers Series 140, University of Pavia, Department of Economics and Management.

    More about this item

    NEP fields

    This paper has been announced in the following NEP Reports:

    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:arx:papers:2107.09055. 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: arXiv administrators (email available below). General contact details of provider: http://arxiv.org/ .

    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.