Back to Search
Start Over
Leveraging LlaMA 2 for sentiment analysis
- Publication Year :
- 2024
-
Abstract
- This thesis investigates the application of sentiment analysis in predicting stock returns for the companies listed in the OMXS30 index. The recent development of large language models (LLMs), like ChatGPT, has substantially advanced the field of sentiment analysis. This thesis utilizes Meta’s LlaMA 2 LLM for sentiment analysis, while a random forest model is employed to predict monthly stock returns for the subsequent month. These predictions enable the creation of a dynamic long-short portfolio, with its returns evaluated against the OMXS30 index using the capital asset pricing model, the Fama–French three-factor model, and the Carhart four-factor model. The results demonstrate that it is possible to generate excess returns by leveraging LlaMA 2, with sentiment ingrained as a key risk factor. The thesis contributes to the existing literature by examining the Swedish stock market as well as using the open-source LLM LlaMA 2.
Details
- Database :
- OAIster
- Notes :
- application/pdf, English
- Publication Type :
- Electronic Resource
- Accession number :
- edsoai.on1445414528
- Document Type :
- Electronic Resource