skip to main content
US FlagAn official website of the United States government
dot gov icon
Official websites use .gov
A .gov website belongs to an official government organization in the United States.
https lock icon
Secure .gov websites use HTTPS
A lock ( lock ) or https:// means you've safely connected to the .gov website. Share sensitive information only on official, secure websites.


Title: Stock price prediction using sentiment Based LSTM: S&P500 vs Reddit posts
The stock market is as volatile as it is unpredictable, the unstable nature of the stock market results in fluctuations in stock prices and invariably, the market performance of stocks. Understanding the underlying factors that contribute to the volatility of the stock market, which has its consequences on stock prices, has become important to researchers and investors alike. Some of the methods that researchers have used in the past as a gauge for understanding market performance include analyzing economic conditions, understanding company performance, following geopolitical events and market trends. To contribute to the vast research field of stock price predictions and the challenge of understanding stock price fluctuations, this study will aim to find a relationship between human sentiments on the social media platform, Reddit, and the S&P 500 stock index. In this study, we will analyze posts from five subreddits that typically discuss the stock market and stock price fluctuations. This will form the first part of our dataset. Historical stock prices for the S&P 500 index will be obtained from Yahoo Finance. This will form our final dataset. Using VADER (Valence aware dictionary and sentiment reasoner), we will extract the sentiments within the five subreddits and categorize them into positive and negative sentiments. The historical stock prices from Yahoo finance will be matched with the aggregate sentiments for each day and this data passed through the LSTM model for training. Our findings provide strong evidence of social media’s impact on stock price predictions.  more » « less
Award ID(s):
2321939
PAR ID:
10498165
Author(s) / Creator(s):
;
Editor(s):
Phillip Bradford, S. Andrew
Publisher / Repository:
Springer Nature Book Series "Lecture Notes in Electrical Engineering"
Date Published:
Journal Name:
The Proceedings of IEMTRONICS 2024
Page Range / eLocation ID:
304-313
Format(s):
Medium: X
Location:
London, UK
Sponsoring Org:
National Science Foundation
More Like this
  1. Böhme, Rainer; Kiffer, Lucianna (Ed.)
    Automated Market Makers (AMMs) are essential in Decentralized Finance (DeFi) as they match liquidity supply with demand. They function through liquidity providers (LPs) who deposit assets into liquidity pools. However, the asset trading prices in these pools often trail behind those in more dynamic, centralized exchanges, leading to potential arbitrage losses for LPs. This issue is tackled by adapting market maker bonding curves to trader behavior, based on the classical market microstructure model of Glosten and Milgrom. Our approach ensures a zero-profit condition for the market maker’s prices. We derive the differential equation that an optimal adaptive curve should follow to minimize arbitrage losses while remaining competitive. Solutions to this optimality equation are obtained for standard Gaussian and Lognormal price models using Kalman filtering. A key feature of our method is its ability to estimate the external market price without relying on price or loss oracles. We also provide an equivalent differential equation for the implied dynamics of canonical static bonding curves and establish conditions for their optimality. Our algorithms demonstrate robustness to changing market conditions and adversarial perturbations, and we offer an on-chain implementation using Uniswap v4 alongside off-chain AI co-processors. 
    more » « less
  2. If a trader could predict price changes in the stock market better than other traders, she would make a fortune. Similarly in the electricity market, a trader that could predict changes in the electricity load, and thus electricity prices, would be able to make large profits. Predicting price changes in the electricity market better than other market participants is hard, but in this paper, we show that attackers can manipulate the electricity prices in small but predictable ways, giving them a competitive advantage in the market. Our attack is possible when the adversary controls a botnet of high wattage devices such as air conditioning units, which are able to abruptly change the total demand of the power grid. Such attacks are called Manipulation of Demand via IoT (MaDIoT) attacks. In this paper, we present a new variant of MaDIoT and name it Manipulation of Market via IoT (MaMIoT). MaMIoT is the first energy market manipulation cyberattack that leverages high wattage IoT botnets to slightly change the total demand of the power grid with the aim of affecting the electricity prices in the favor of specific market players. Using real-world data obtained from two major energy markets, we show that MaMIoT can significantly increase the profit of particular market players or financially damage a group of players depending on the motivation of the attacker. 
    more » « less
  3. Nguyen, Ngoc T; Botzheim, János; Gulyás, László; Nunez, Manuel; Treur, Jan; Vossen, Gottfried; Kozierkiewicz, Adrianna" (Ed.)
    The stock market is affected by a seemingly infinite number of factors, making it highly uncertain yet impactful. A large determinant of stock performance is public sentiment, which can often be volatile. To integrate human inputs in a more structured and effective manner, this study explores a combination of the wisdom of crowds concept and machine learning (ML) for stock price prediction. A crowdsourcing study is developed to test three ways to elicit stock predictions from the crowd. The study also assesses the impact of priming participants with estimates provided by a Long Short Term Model (LSTM) model herein developed for this context. 
    more » « less
  4. We present an agent-based model of manipulating prices in financial markets through spoofing: submitting spurious orders to mislead traders who learn from the order book. Our model captures a complex market environment for a single security, whose common value is given by a dynamic fundamental time series. Agents trade through a limit-order book, based on their private values and noisy observations of the fundamental. We consider background agents following two types of trading strategies: the non-spoofable zero intelligence (ZI) that ignores the order book and the manipulable heuristic belief learning (HBL) that exploits the order book to predict price outcomes. We conduct empirical game-theoretic analysis upon simulated agent payoffs across parametrically different environments and measure the effect of spoofing on market performance in approximate strategic equilibria. We demonstrate that HBL traders can benefit price discovery and social welfare, but their existence in equilibrium renders a market vulnerable to manipulation: simple spoofing strategies can effectively mislead traders, distort prices and reduce total surplus. Based on this model, we propose to mitigate spoofing from two aspects: (1) mechanism design to disincentivize manipulation; and (2) trading strategy variations to improve the robustness of learning from market information. We evaluate the proposed approaches, taking into account potential strategic responses of agents, and characterize the conditions under which these approaches may deter manipulation and benefit market welfare. Our model provides a way to quantify the effect of spoofing on trading behavior and market efficiency, and thus it can help to evaluate the effectiveness of various market designs and trading strategies in mitigating an important form of market manipulation. 
    more » « less
  5. Abstract We develop a new market‐making model, from the ground up, which is tailored toward high‐frequency trading under a limit order book (LOB), based on the well‐known classification of order types in market microstructure. Our flexible framework allows arbitrary order volume, price jump, and bid‐ask spread distributions as well as the use of market orders. It also honors the consistency of price movements upon arrivals of different order types. For example, it is apparent that prices should never go down on buy market orders. In addition, it respects the price‐time priority of LOB. In contrast to the approach of regular control on diffusion as in the classical Avellaneda and Stoikov (Quantitative Finance, 8, 217, 2008) market‐making framework, we exploit the techniques of optimal switching and impulse control on marked point processes, which have proven to be very effective in modeling the order book features. The Hamilton‐Jacobi‐Bellman quasi‐variational inequality (HJBQVI) associated with the control problem can be solved numerically via finite‐difference method. We illustrate our optimal trading strategy with a full numerical analysis, calibrated to the order book statistics of a popular exchanged‐traded fund (ETF). Our simulation shows that the profit of market‐making can be severely overstated under LOBs with inconsistent price movements. 
    more » « less