Skip to main content

LUP Student Papers

LUND UNIVERSITY LIBRARIES

Index prediction on the Swedish stock market using natural language processing methods on Swedish news

Ris, Erik LU and Sjöberg, Axel LU (2021) In Master's thesis in Matematical Scieces FMSM01 20211
Mathematical Statistics
Abstract
This master thesis explores if topic modelling and sentiment analysis on Swedish financial newspaper data can be used to predict the direction of the Swedish stock market. A pipeline was set up where full length articles as well as article summaries were fed into a topic model and a sentiment analysis model. Several methods for combining the outputs of these models were explored in order to create data representations. The data representations were fed into four different machine learning models and one deep learning model that predicted the direction of stock index movement for three time periods: daily, weekly and monthly. The performance of the stock market index prediction model showed great promise on the in-sample data, alas, no... (More)
This master thesis explores if topic modelling and sentiment analysis on Swedish financial newspaper data can be used to predict the direction of the Swedish stock market. A pipeline was set up where full length articles as well as article summaries were fed into a topic model and a sentiment analysis model. Several methods for combining the outputs of these models were explored in order to create data representations. The data representations were fed into four different machine learning models and one deep learning model that predicted the direction of stock index movement for three time periods: daily, weekly and monthly. The performance of the stock market index prediction model showed great promise on the in-sample data, alas, no conclusive answer could be drawn from the results when testing on the out-of-sample data. Allowing for the topic model to be trained on the test period, some encouraging results were obtained that lead to interesting observations which serves as a foundation for future research.

This master thesis was written under guidance of Lund University, Faculty of Engineering, Division of Mathematical Statistics and in collaboration with the company Sanctify Financial Technologies. (Less)
Popular Abstract (Swedish)
Varje dag publiceras stora mängder nyheter som både informerar och påverkar människor. I takt med framsteg inom maskininlärning samt att datorkraft blivit mer tillgängligt har nya tillvägagångsätt för att automatisk analysera text tillkommit. I kombination med att mer och mer alternativa datakällor används för att utföra aktieanalyser har detta resulterat i ett nytt forskningområde: automatisk textanalys för att prediktera rörelser på aktiemarknaden.

I vår uppsats har vi med hjälp av olika språkteknoligiska algoritmer representerat hundratusentals nyhetsartiklar från en stor svensk affärstidning på ett lättförståeligt sätt för människor. Ämnesmodellering med hjälp av Latent Dirichlet Allokering (LDA) har använts för att hitta ämnen... (More)
Varje dag publiceras stora mängder nyheter som både informerar och påverkar människor. I takt med framsteg inom maskininlärning samt att datorkraft blivit mer tillgängligt har nya tillvägagångsätt för att automatisk analysera text tillkommit. I kombination med att mer och mer alternativa datakällor används för att utföra aktieanalyser har detta resulterat i ett nytt forskningområde: automatisk textanalys för att prediktera rörelser på aktiemarknaden.

I vår uppsats har vi med hjälp av olika språkteknoligiska algoritmer representerat hundratusentals nyhetsartiklar från en stor svensk affärstidning på ett lättförståeligt sätt för människor. Ämnesmodellering med hjälp av Latent Dirichlet Allokering (LDA) har använts för att hitta ämnen omskrivna i tidningen. För att undersöka hur tonen i de publicerade nyhetsartiklarna varierat har sentimentanalys använts. Dessa två metoder har sedan kombinerats för att för att skapa en representation av tonläget för olika ämnen över tid. Därefter har denna representation använts för att med hjälp av maskininlärningsmetoder försöka förutsäga rörelser för olika aktieindex över flera tidshorisonter.

Arbetet har varit explorativt i sin natur och fokus har legat på att analysera de olika delstegen i metoden. Vi gör bedömningen att resultaten är otillräckliga för att fullständigt kunna svara på frågeställningen huruvida automatisk textanalys av svenska finansiella nyheter kan användas för att förutse riktningen på den svenska aktiemarkanden. Det finns resultat som talar för att så skulle vara fallet, men mer forskning krävs för att kunna etablera detta. Vårt arbete lägger en grund för sådan framtida forskning, och knyter inte enbart ann till fältet aktieanalys med hjälp av alternativ data utan även automatisk textanalys av text på svenska. Metoden vi har använt har också tidigare använts för att förutse BNP och skulle mycket väl kunna användas för att förutse ytterligare variabler av intresse så som arbetslöshet eller opinionssiffror. (Less)
Please use this url to cite or link to this publication:
author
Ris, Erik LU and Sjöberg, Axel LU
supervisor
organization
course
FMSM01 20211
year
type
H2 - Master's Degree (Two Years)
subject
keywords
Stock market prediction, Index prediction, Sentiment analysis, Topic modelling, LDA, Swedish newspaper data, NLP, Machine Learning, RNN
publication/series
Master's thesis in Matematical Scieces
report number
LUTFMS-3428-2021
ISSN
1404-6342
other publication id
2021:E53
language
English
id
9059706
date added to LUP
2021-07-02 16:21:16
date last changed
2021-07-02 16:21:16
@misc{9059706,
  abstract     = {{This master thesis explores if topic modelling and sentiment analysis on Swedish financial newspaper data can be used to predict the direction of the Swedish stock market. A pipeline was set up where full length articles as well as article summaries were fed into a topic model and a sentiment analysis model. Several methods for combining the outputs of these models were explored in order to create data representations. The data representations were fed into four different machine learning models and one deep learning model that predicted the direction of stock index movement for three time periods: daily, weekly and monthly. The performance of the stock market index prediction model showed great promise on the in-sample data, alas, no conclusive answer could be drawn from the results when testing on the out-of-sample data. Allowing for the topic model to be trained on the test period, some encouraging results were obtained that lead to interesting observations which serves as a foundation for future research. 

This master thesis was written under guidance of Lund University, Faculty of Engineering, Division of Mathematical Statistics and in collaboration with the company Sanctify Financial Technologies.}},
  author       = {{Ris, Erik and Sjöberg, Axel}},
  issn         = {{1404-6342}},
  language     = {{eng}},
  note         = {{Student Paper}},
  series       = {{Master's thesis in Matematical Scieces}},
  title        = {{Index prediction on the Swedish stock market using natural language processing methods on Swedish news}},
  year         = {{2021}},
}