<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/momentum-investing-enhanced-by-microsoft-foundry-hosted-large-language-model-dqokjfpbo" -->

---
title: Momentum Investing Enhanced by Microsoft Foundry-Hosted...
description: A tutorial demonstrating how to combine traditional momentum investing with LLM-generated sentiment scores using R. The strategy screens the top 20 S&P 500...
canonical: https://daily.dev/posts/momentum-investing-enhanced-by-microsoft-foundry-hosted-large-language-model-dqokjfpbo
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Momentum Investing Enhanced by Microsoft Foundry-Hosted Large Language Model | daily.dev
og:description: A tutorial demonstrating how to combine traditional momentum investing with LLM-generated sentiment scores using R. The strategy screens the top 20 S&P 500...
og:url: https://daily.dev/posts/momentum-investing-enhanced-by-microsoft-foundry-hosted-large-language-model-dqokjfpbo
og:image: https://api.daily.dev/og/posts/dQokJfPBO.png
og:image:alt: Momentum Investing Enhanced by Microsoft Foundry-Hosted Large Language Model
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Momentum Investing Enhanced by Microsoft Foundry-Hosted Large Language Model

**[R-bloggers](https://daily.dev/sources/rbloggers)** · 7 min read · 0 upvotes · 0 comments

## Summary

A tutorial demonstrating how to combine traditional momentum investing with LLM-generated sentiment scores using R. The strategy screens the top 20 S&P 500 stocks by YTD returns, queries Bing News for recent headlines, sends them to a Microsoft Azure AI Foundry-hosted LLM, and uses the resulting sentiment scores (0–1) to re-weight and narrow the portfolio to 10 high-conviction stocks. Key parameters include a 5-day lookback window, 5-day forecast horizon, and weekly rebalancing. Full R code is provided using tidyquant, httr, and gt packages. The resulting portfolio shows heavy energy sector concentration, attributed to geopolitical tensions boosting oil and gas sentiment.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.r-bloggers.com/2026/03/momentum-investing-enhanced-by-microsoft-foundry-hosted-large-language-model/>

## Similar posts on daily.dev

- [Building an End-to-End Sentiment Analysis Pipeline with Scikit-LLM](https://daily.dev/posts/building-an-end-to-end-sentiment-analysis-pipeline-with-scikit-llm-dh45aqfbd) · Machine Learning Mastery · 2 upvotes · 0 comments
- [Building a hybrid demand forecasting service: classical ML for the number, an LLM for the why](https://daily.dev/posts/building-a-hybrid-demand-forecasting-service-classical-ml-for-the-number-an-llm-for-the-why-bfbys6aak) · Medium · 1 upvotes · 0 comments
- [Getting Back to Basics](https://daily.dev/posts/getting-back-to-basics-8dse6eor7) · Simple Thread · 75 upvotes · 2 comments
- [LLM-Powered Time-Series Analysis](https://daily.dev/posts/llm-powered-time-series-analysis-jdiffr0zs) · Towards Data Science · 2 upvotes · 0 comments
- [LLMs are stuck in a groupthink rut. This startup is trying to get them out.](https://daily.dev/posts/llms-are-stuck-in-a-groupthink-rut-this-startup-is-trying-to-get-them-out--2otelcdhy) · MIT Technology Review · 1 upvotes · 0 comments

---

Tags: [#azure](https://daily.dev/tags/azure), [#llm](https://daily.dev/tags/llm), [#r](https://daily.dev/tags/r), [#sentiment-analysis](https://daily.dev/tags/sentiment-analysis)

[View this post on daily.dev](https://daily.dev/posts/momentum-investing-enhanced-by-microsoft-foundry-hosted-large-language-model-dqokjfpbo)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Momentum Investing Enhanced by Microsoft Foundry-Hosted Large Language Model","url":"https://daily.dev/posts/momentum-investing-enhanced-by-microsoft-foundry-hosted-large-language-model-dqokjfpbo","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/momentum-investing-enhanced-by-microsoft-foundry-hosted-large-language-model-dqokjfpbo"},"datePublished":"2026-03-28T18:01:37.615Z","dateModified":"2026-03-28T18:02:03.771Z","description":"A tutorial demonstrating how to combine traditional momentum investing with LLM-generated sentiment scores using R. The strategy screens the top 20 S\u0026P 500...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/096c3169a4dca4aa84657b7453cbcdcc?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/096c3169a4dca4aa84657b7453cbcdcc?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"R-bloggers","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"R-bloggers","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/98bcbbdf72774292a55ceda8f2277f1e","url":"https://daily.dev/sources/rbloggers"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/momentum-investing-enhanced-by-microsoft-foundry-hosted-large-language-model-dqokjfpbo","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"azure,llm,r,sentiment-analysis","timeRequired":"PT7M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"R-bloggers","item":"https://daily.dev/sources/rbloggers"},{"@type":"ListItem","position":3,"name":"Momentum Investing Enhanced by Microsoft Foundry-Hosted Large Language Model"}]}
```

