Search arXivSearch

arXiv · 2107.09055

Stock price prediction using BERT and GAN

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.

Explore related subjects

Keep this discovery

Explore connections, maps & timelines

BibTeXRIS

Priyank Sonkiya, Vikas Bajpai, Anukriti Bansal. 2021-07-18. Stock price prediction using BERT and GAN. https://arxiv.org/abs/2107.09055

Cite the original work for its findings. Save a collection to share your selection of sources.

KEEP EXPLORING

Related papers

Causal Discovery in Financial Markets: A Framework for Nonstationary Time-Series Data

This paper introduces a new causal structure learning method for nonstationary time series data, a common data type found in fields such as finance, economics, healthcare, and environmental science. Our work builds upon the constraint-based causal discovery from nonstationary data algorithm (CD-NOD). We introduce a refined version (CDNOTS) which is designed specifically to account for lagged dependencies in time series data. We compare the performance of different algorithmic choices, such as the type of conditional independence test and the significance level, to help select the best hyperparameters given various scenarios of sample size, problem dimensionality, and availability of computational resources. Using the results from the simulated data, we apply CDNOTS to a broad range of real-world financial applications in order to identify causal connections among nonstationary time series data, thereby illustrating applications in factor-based investing, portfolio diversification, and comprehension of market dynamics.

q-fin.ST

Extreme Value Analysis for Finite, Multivariate and Correlated Systems with Finance as an Example

Extreme values and the tail behavior of probability distributions are essential for quantifying and mitigating risk in complex systems of all kinds. In multivariate settings, accounting for correlations is crucial. Although extreme value analysis for infinite correlated systems remains an open challenge, we propose a practical framework for handling a large but finite number of correlated time series. We develop our approach for finance as a concrete example but emphasize its generality. We study the extremal behavior of high-frequency stock returns after rotating them into the eigenbasis of the correlation matrix. This separates and extracts various collective effects, including information on the correlated market as a whole and on correlated sectoral behavior from idiosyncratic features, while allowing us to use univariate tools of extreme value analysis. This holds even for high-frequency data where discretization effects normally complicate analysis. We employ a peaks-over-threshold approach and thereby fully avoid the analysis of block maxima. We estimate the tail shape of the rotated returns while explicitly accounting for nonstationarity, a key feature in finance and many other complex systems. Our framework facilitates tail risk estimation relative to larger trends and intraday seasonalities at both market and sectoral levels.

q-fin.ST

Does Crypto Sentiment Extremity Widen Estimated Spreads? Evidence Depends on the Specification

We examine whether extreme values of the Crypto Fear & Greed Index are associated with a daily high-low spread estimate for Bitcoin. The sample contains 2,896 BTC/USDT observations from February 2018 to January 2026. We find an unconditional extreme-minus-neutral gap of 61.99 basis points. After close-to-close realised-volatility-quintile demeaning it is 24.79 basis points, although none of the five separate quintile contrasts survives Holm correction. With quadratic realised-volatility and strictly lagged momentum controls, the HAC estimate is 11.81 basis points (95% CI [-2.31,25.93], p=.101). A fixed non-parametric stratification gives 20.44 basis points (p=.0195 under circular shifts), while separate models for a zero-floored estimate's incidence and positive magnitude are imprecise. The results therefore show only a descriptive, specification-dependent association. We conclude that they do not establish a stable or causal liquidity premium.

q-fin.ST