Digitala Vetenskapliga Arkivet

Change search
CiteExportLink to record
Permanent link

Direct link
Cite
Citation style
  • apa
  • ieee
  • modern-language-association-8th-edition
  • vancouver
  • Other style
More styles
Language
  • de-DE
  • en-GB
  • en-US
  • fi-FI
  • nn-NO
  • nn-NB
  • sv-SE
  • Other locale
More languages
Output format
  • html
  • text
  • asciidoc
  • rtf
Sentiment-Driven Portfolio Optimization: Evaluating Fear & Greed with XGBoost and Black-Litterman's Allocation Model
KTH, School of Electrical Engineering and Computer Science (EECS).
KTH, School of Electrical Engineering and Computer Science (EECS).
2025 (English)Independent thesis Basic level (degree of Bachelor), 10 credits / 15 HE creditsStudent thesisAlternative title
Sentimentsdriven portföljoptimering : En utvärdering av Rädsla & Girighet med XGBoost och Black-Littermans Allokeringsmodell (Swedish)
Abstract [en]

Investor sentiment plays a crucial role in driving sudden market regime shifts. The idea of exiting markets before major downturns and re-entering ahead of rallies is appealing – but can it be achieved through a systematic approach? This study explores the use of Fear and Greed Indices as proxies for investor sentiment, combined with ETF data for four major asset classes: stocks (SPY), bonds (BND), gold (GLD), and cryptocurrencies (HODL.PA). We employ the machine learning algorithm XGBoost to uncover patterns that may predict short-term market movements. These predictions are then used as inputs, or "views," in the Black-Litterman model to optimize portfolio weights. The model was evaluated using different configurations, with both pre fine-tuned and fine-tuned hyperparameters, using training sizes 80% of the data. Our results show that the sentiment-driven portfolio was able to outperform a traditional 60/40 portfolio (60% stocks, 40% bonds) in several scenarios – but only before hyperparameter tuning. Once tuning was applied, the model’s performance declined and consistently underperformed relative to the 60/40 benchmark. These findings suggest that incorporating sentiment through machine learning offers potential, especially in simpler model configurations. However, the results also highlight the risk of overfitting and the challenge of generalizing in non-stationary financial environments. Overall, the approach shows promise, but does not provide a reliable improvement over traditional portfolio strategies.

Abstract [sv]

Investerares sentiment spelar en avgörande roll i plötsliga skiften mellan olika marknadsregimer. Tanken att kunna lämna marknaden innan större nedgångar och återinträda inför uppgångar är lockande – men går det att uppnå detta på ett systematiskt sätt? Denna studie undersöker möjligheten att använda Fear and Greed-index (rädsla och girighet) som indikatorer för investerarsentiment, i kombination med ETF-data för fyra tillgångsslag: aktier (SPY), obligationer (BND), guld (GLD) och kryptovalutor (HODL.PA). Vi använder maskininlärningsalgoritmen XGBoost för att identifiera mönster som kan förutsäga kortsiktiga marknadsrörelser. Dessa prediktioner används sedan som indata, i form av “views", i Black-Litterman-modellen för att optimera portföljens viktning. Modellen utvärderades med olika konfigurationer, både före och efter finjustering av hyperparametrar, och med 80% av datan som träningsunderlag. Resultaten visar att den sentimentbaserade portföljen kunde överträffa en traditionell 60/40-portfölj (60% aktier, 40% obligationer) i flera scenarier – men endast före hyperparametrarna finjusterades. Efter tuning försämrades modellens prestanda och den underpresterade jämfört med 60/40-portföljen. Resultaten tyder på att det finns potential i att integrera sentiment i portföljoptimering med hjälp av maskininlärning, särskilt i enklare modellkonfigurationer. Samtidigt belyser studien risken för överanpassning och svårigheten att generalisera i ett föränderligt finansiellt landskap. Sammanfattningsvis visar metoden lovande resultat, men erbjuder ingen tillförlitlig förbättring jämfört med traditionella portföljstrategier.

Place, publisher, year, edition, pages
2025. , p. 44
Series
TRITA-EECS-EX ; 2025:344
Keywords [en]
Portfolio Optimization, Machine Learning, Fear and Greed, XGBoost, Black- Litterman Allocation Model, 60/40-portfolio, Exchange-Traded Funds (ETFs), Fine-Tuning
Keywords [sv]
Portföljoptimering, Maskininlärning, Rädsla och Girighet, XGBoost, Black-Littermans Allokeringsmodell, 60/40-portfölj, Börshandlade Fonder, Fine-Tuning
National Category
Computer and Information Sciences
Identifiers
URN: urn:nbn:se:kth:diva-367686OAI: oai:DiVA.org:kth-367686DiVA, id: diva2:1985836
Supervisors
Examiners
Available from: 2025-08-05 Created: 2025-07-28 Last updated: 2025-08-05Bibliographically approved

Open Access in DiVA

fulltext(2058 kB)407 downloads
File information
File name FULLTEXT01.pdfFile size 2058 kBChecksum SHA-512
f49f0d69388507a58165ba264da07b1dffa23796e439236691cd21ef9112cab89f61335ec0876c4f840f662cfd13f5432a71c3c7d9a43572dc586c4075bd1235
Type fulltextMimetype application/pdf

By organisation
School of Electrical Engineering and Computer Science (EECS)
Computer and Information Sciences

Search outside of DiVA

GoogleGoogle Scholar
Total: 409 downloads
The number of downloads is the sum of all downloads of full texts. It may include eg previous versions that are now no longer available

urn-nbn

Altmetric score

urn-nbn
Total: 1238 hits
CiteExportLink to record
Permanent link

Direct link
Cite
Citation style
  • apa
  • ieee
  • modern-language-association-8th-edition
  • vancouver
  • Other style
More styles
Language
  • de-DE
  • en-GB
  • en-US
  • fi-FI
  • nn-NO
  • nn-NB
  • sv-SE
  • Other locale
More languages
Output format
  • html
  • text
  • asciidoc
  • rtf