Back to search

Wilfrid Laurier University

Application of Sentiment Analysis in Stock Market Prediction

Abstract

dc:description

This thesis aims to predict Apple's stock return using the sentiment of financial news headlines. There is a tremendous amount of financial news posts daily, and their headlines include crucial information. The financial news headlines may influence the readers and lead them to make certain trading decisions after reading the news. Therefore, financial news headlines could potentially impact the financial market. By understanding the connection between the headlines and the financial market, we can construct profitable trading strategies based on our analysis of daily headlines. Specifically, the sentiments in the headlines can result in positive, negative, or neutral impacts on the financial market. By analyzing the headline sentiments, we can learn the market trend. Before we examined the sentiments, we used natural language processing techniques to clean the texts and select essential features from the headlines. We also implemented the principal component analysis to reduce the dimension of the data set. Then, we constructed statistical models to explore how headline sentiments impact the financial market. Specifically, we focused on detecting how the headlines affect Apple's stock price. The headlines can impact the stock price positively, negatively, or neutrally. Logistic regression was proposed to model stock returns. We constructed one-stage, two-stage, and three-stage classification models. In addition, we used logistic, LASSO, and support vector machine (SVM) to construct regression models and analyze the connection between headline sentiments and stock price. Also, we introduced a new metric to assess the performance scores of multi-stage regression models so that we could select the best approach. Furthermore, we constructed trading strategies consisting of vanilla call and put options based on the predictions made with the best models selected. We created nine trading strategies applied for the period from 2018-05-31 to 2019-05-31. The annual return for the best trading strategy is 169.265%. Even the worst trading strategy we constructed earned 58.39993% per year, while the annual return of the S&P 500 was 1.73% during this period. Therefore, our thesis successfully created multi-stage models that use financial news headlines to predict stock returns and applied predictions to construct trading strategies with high returns.

Degree

thesis:*
Name thesis:degree_name
Master of Science (MSc)
Discipline thesis:degree_discipline
Mathematics
Grantor dc:publisher
Wilfrid Laurier University
Year dc:date.available
2023

Author and committee

dc:creator, dc:contributor.*
Author dc:creator
  • He, Jia Wei
Contributors dc:contributor
  • Roman Makarov
  • David Soave

Rights

dc:rights
Statement dc:rights
  • 2 Publicly accessible
Language dc:language
en

Identifiers

dc:identifier.*
Repository record dc:identifier
https://scholars.wlu.ca/etd/2544

Chain of custody

source
Harvested from
Wilfrid Laurier University
Base URL
scholars.wlu.ca/do/oai/
Last updated
2026-11-18
Source record
OAI-PMH GetRecord
related terms
citation

He, Jia Wei. Application of Sentiment Analysis in Stock Market Prediction. Wilfrid Laurier University, 2023. https://scholars.wlu.ca/etd/2544