Témata prací (Výběr práce)Témata prací (Výběr práce)(verze: 390)
Detail práce
   Přihlásit přes CAS
Twitter sentiment as an indicator for a threshold-switching strategy between stocks and gold
Název práce v češtině: Cítění na Twitteru jako indikátor pro threshold-switching strategii mezi akciemi a zlatem
Název v anglickém jazyce: Twitter sentiment as an indicator for a threshold-switching strategy between stocks and gold
Akademický rok vypsání: 2024/2025
Typ práce: bakalářská práce
Jazyk práce: angličtina
Ústav: Institut ekonomických studií (23-IES)
Vedoucí / školitel: PhDr. František Čech, Ph.D.
Řešitel: skrytý - zadáno vedoucím/školitelem
Datum přihlášení: 19.06.2025
Datum zadání: 19.06.2025
Seznam odborné literatury
maheu, J. M., & McCurdy, T. H. (2000). Identifying Bull and Bear Markets in Stock Returns. Journal of Business & Economic Statistics, 18(1), 100–112. https://doi.org/10.1080/07350015.2000.10524851

Nooijen, S. J., & Broda, S. A. (2016). Predicting Equity Markets with Digital Online Media Sentiment: Evidence from Markov-switching Models. Journal of Behavioral Finance, 17(4), 321–335. https://doi.org/10.1080/15427560.2016.1238370

BAKER, M. and WURGLER, J. (2006), Investor Sentiment and the Cross-Section of Stock Returns. The Journal of Finance, 61: 1645-1680. https://doi.org/10.1111/j.1540-6261.2006.00885.x

Nti, I.K., Adekoya, A.F. & Weyori, B.A. A systematic review of fundamental and technical analysis of stock market predictions. Artif Intell Rev 53, 3007–3057 (2020). https://doi.org/10.1007/s10462-019-09754-z

Dirk G. Baur, Thomas K.J. McDermott, Why is gold a safe haven?, Journal of Behavioral and Experimental Finance, Volume 10, 2016, Pages 63-71, ISSN 2214-6350, https://doi.org/10.1016/j.jbef.2016.03.002

Lawrence, C. (2003). Why is gold different from other assets? An empirical investigation. London, UK: The World Gold Council.

Nystrup, P., William Hansen, B., Madsen, H. et al. Detecting change points in VIX and S&P 500: A new approach to dynamic asset allocation. J Asset Manag 17, 361–374 (2016). https://doi.org/10.1057/jam.2016.12

Marcucci, J. (2005). Forecasting Stock Market Volatility with Regime-Switching GARCH Models. Studies in Nonlinear Dynamics & Econometrics, 9(4). https://doi.org/10.2202/1558-3708.1145
Předběžná náplň práce
Research question and motivation
Can online public sentiment serve as an effective indicator for a portfolio switching strategy between stocks and gold?
In recent years the stock market has experienced multiple crises and shocks due to the Covid-19 pandemic in 2020, the Ukraine war in 2022 and even the recent tariff uncertainty in 2025. During such times it is important for the passive investor to know where to allocate their money in order to minimize the losses from increased market volatility.
The question this thesis attempts to answer is whether the allocation of funds into a safer and more stable asset provides the passive investor with greater risk-adjusted returns than simply holding onto their stocks.
There are multiple assets considered safer than stocks (Dirk G. Baur, Thomas K.J. McDermott; 2016), however this thesis will be concerned with gold mainly due to its interesting properties as a save-haven asset (Lawrence, C.; 2003).
In the case of switching from stocks to gold it is important to know when such a switch should occur, for which the online public sentiment via the Twitter API will be used. Most investing strategies focus on technical data of price movements and historical market volatility (Nti, I.K., Adekoya, A.F. & Weyori, B.A.; 2020), while public sentiment on social media is proven to accurately represent the general fear or optimism of investors (Nooijen, S. J., & Broda, S. A.; 2016).
This thesis will thus use a threshold switching model based on the real-time public sentiment data from Twitter to analyze whether greater risk-adjusted returns are achieved when switching to gold in contrast with simply buying and holding stocks.

Contribution
The main practical application of my thesis is to answer the question, whether simple passive investing is the best strategy when market volatility is present and subsequently provide the passive investor a sound investing strategy for such uncertain times. While numerous studies have been conducted on investment strategies under market volatility using volatility indicators such as VIX (Nystrup, P., William Hansen, B., Madsen, H. et al.; 2016), or using volatility detection tools such as GARCH model (Marcucci, J.; 2005), my thesis aims to approach this problematic using a behavioral aspect thanks to the usage of online public sentiment metric via Twitter. The impact of such indicator has been studied (Nooijen, S. J., & Broda, S. A.; 2016), however most of the research does not include an investment strategy analysis, meaning such combination offers a topic not yet extensively explored.

Methodology
The main goal of the thesis will be to compare two investment portfolios, one using a simple buy-and-hold strategy, which would be considered the status quo, and one switching from stocks to gold. The default portfolio will track some of the largest stock indices across multiple countries, such as S&P 500, DJIA, EURO STOXX 50 or Nikkei 225. After the switch the portfolio will replace some or all of its assets with gold. The timeframe for the data collection will presumably be from 2018 to 2025 in order to encapsulate the three high volatility periods mentioned in the motivation.
The switching will be executed based on Twitter public sentiment data, which will have to be collected using the Twitter API. The raw data will then be filtered for certain phrases, such as “bear market”, ”bull market”, “sell stocks”, “buy gold” etc., and then using VADER (Valence Aware Dictionary for Sentiment Reasoning) the data will be converted into numerical scores, which will then be processed to represent the public sentiment for a given point in time. Next the switching thresholds will be defined. All the data collected thus far will then be used to determine when to reallocate from stocks to gold and the two portfolios will be compared to eachother to determine which strategy had better performance. Lastly all the results will be interpreted and a conclusion will be drawn from them.

Outline
1. Introduction
2. Literature review
3. Data
4. Methodology
5. Results
6. Conclusion
 
Univerzita Karlova | Informační systém UK