{"id":241131,"date":"2026-04-06T12:53:39","date_gmt":"2026-04-06T16:53:39","guid":{"rendered":"https:\/\/ibkrcampus.com\/campus\/?p=241131"},"modified":"2026-04-06T12:55:03","modified_gmt":"2026-04-06T16:55:03","slug":"momentum-investing-enhanced-by-microsoft-foundry-hosted-large-language-model","status":"publish","type":"post","link":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/momentum-investing-enhanced-by-microsoft-foundry-hosted-large-language-model\/","title":{"rendered":"Momentum Investing Enhanced by Microsoft Foundry-Hosted Large Language Model"},"content":{"rendered":"\n<p><em>The article &#8220;Momentum Investing Enhanced by Microsoft Foundry-Hosted Large Language Model&#8221; was originally published on <a href=\"https:\/\/datageeek.com\/2026\/03\/28\/momentum-investing-enhanced-by-microsoft-foundry-hosted-large-language-model\/\">DataGeeek<\/a> blog.<\/em><\/p>\n\n\n\n<p><strong><a href=\"https:\/\/papers.ssrn.com\/sol3\/papers.cfm?abstract_id=5680782\" target=\"_blank\" rel=\"noreferrer noopener\"><em>LLM-enhanced momentum investing<\/em><\/a><\/strong>&nbsp;combines traditional momentum signals with real-time news interpretation by large language models (LLMs). The idea is straightforward: stocks with strong past returns are candidates for momentum portfolios, but their inclusion and weight are refined by LLM-generated sentiment scores derived from firm-specific news. This hybrid approach improves&nbsp;<strong>risk-adjusted returns<\/strong>&nbsp;(Sharpe, Sortino) and is particularly effective in concentrated, high-conviction portfolios.<\/p>\n\n\n\n<p><strong>Key Parameters<\/strong><\/p>\n\n\n\n<p>1.&nbsp;<strong>Lookback Window (k)<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Definition:<\/strong>&nbsp;The number of past days of news considered for sentiment analysis.<\/li>\n\n\n\n<li><strong>Role:<\/strong>&nbsp;Determines how much recent information the LLM uses to judge momentum continuation.<\/li>\n\n\n\n<li><strong>Example:<\/strong>&nbsp;If k = 5, the model analyzes the last 5 business days of headlines and summaries for each stock.<\/li>\n<\/ul>\n\n\n\n<p>2.&nbsp;<strong>Forecast Horizon (l)<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Definition:<\/strong>&nbsp;The period over which momentum continuation is predicted.<\/li>\n\n\n\n<li><strong>Role:<\/strong>&nbsp;Sets the \u201ctarget\u201d for the LLM\u2019s forecast \u2014 how far into the future the model should judge momentum persistence.<\/li>\n\n\n\n<li><strong>Example:<\/strong>&nbsp;If&nbsp;<code>l =&nbsp;<\/code>5, the LLM predicts whether momentum will continue for the next 5 trading days.<\/li>\n\n\n\n<li><strong>Connection to Rebalancing:<\/strong>&nbsp;The forecast horizon typically aligns with the rebalancing cycle. For weekly rebalancing, the horizon is 5 days; for monthly rebalancing, it\u2019s ~21 days.<\/li>\n<\/ul>\n\n\n\n<p>3.&nbsp;<strong>Portfolio Size (m)<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Definition:<\/strong>&nbsp;The number of stocks selected after LLM scoring.<\/li>\n\n\n\n<li><strong>Role:<\/strong>&nbsp;Controls how concentrated or diversified the portfolio is.<\/li>\n\n\n\n<li><strong>Example:<\/strong>&nbsp;From the top 20 YTD performers, you might select the top 10 after sentiment scoring.<\/li>\n<\/ul>\n\n\n\n<p>4.&nbsp;<strong>Rebalancing Frequency (T)<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Definition:<\/strong>&nbsp;How often the portfolio is updated with new signals.<\/li>\n\n\n\n<li><strong>Role:<\/strong>&nbsp;Sets the rhythm of portfolio refresh \u2014 weekly, monthly, or quarterly.<\/li>\n\n\n\n<li><strong>Example:<\/strong>&nbsp;Weekly rebalancing means recalculating momentum and sentiment scores every 5 trading days.<\/li>\n<\/ul>\n\n\n\n<p><strong>Concept<\/strong><\/p>\n\n\n\n<p>The strategy begins with a&nbsp;<strong>classic momentum screen<\/strong>: select the&nbsp;<strong>top 20 S&amp;P 500 companies by year-to-date (YTD) performance<\/strong>. Instead of stopping there, the approach integrates&nbsp;<strong>large language model (LLM) sentiment analysis<\/strong>&nbsp;of firm-specific news. By analyzing the&nbsp;<strong>last 5 business days of headlines and summaries<\/strong>, the LLM produces a score indicating whether momentum is likely to continue.<\/p>\n\n\n\n<p>These scores are then used to&nbsp;<strong>re-weight the portfolio<\/strong>, tilting allocations toward companies with stronger news sentiment. Finally, the portfolio is narrowed to the&nbsp;<strong>top 10 conviction stocks<\/strong>.<\/p>\n\n\n\n<p><strong>Selected Parameters<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Lookback Window:<\/strong>&nbsp;5 days of firm-specific news.<\/li>\n\n\n\n<li><strong>Rebalancing Frequency:<\/strong>&nbsp;Weekly updates of the portfolio.<\/li>\n\n\n\n<li><strong>Forecast Horizon:<\/strong>&nbsp;5 trading days (aligned with the rebalancing cycle).<\/li>\n<\/ul>\n\n\n\n<p>This setup ensures that the LLM is asked to judge whether momentum will persist until the next rebalance, making the signals both&nbsp;<strong>short-term and actionable<\/strong>.<\/p>\n\n\n\n<p><strong>What the Code Does Step by Step<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Fetching the Data<\/strong>\n<ul class=\"wp-block-list\">\n<li>The&nbsp;<strong>R&nbsp;<\/strong>script first pulls all S&amp;P 500 tickers.<\/li>\n\n\n\n<li>It calculates&nbsp;<strong>YTD returns<\/strong>&nbsp;for each stock.<\/li>\n\n\n\n<li>The&nbsp;<strong>top 20 stocks<\/strong>&nbsp;by performance are selected as momentum candidates.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>News Sentiment Analysis with LLM<\/strong>\n<ul class=\"wp-block-list\">\n<li>For each of these 20 stocks, the code queries Bing News for recent headlines with&nbsp;<a href=\"https:\/\/learn.microsoft.com\/en-us\/azure\/architecture\/ai-ml\/guide\/data-science-and-machine-learning#ai-services-in-azure\" target=\"_blank\" rel=\"noreferrer noopener\"><em><strong>Azure AI Services<\/strong><\/em><\/a>.<\/li>\n\n\n\n<li>The last&nbsp;<strong>5 business days of news<\/strong>&nbsp;are collected.<\/li>\n\n\n\n<li>These headlines and summaries are sent to a&nbsp;<a href=\"https:\/\/learn.microsoft.com\/en-us\/azure\/foundry\/what-is-foundry\" target=\"_blank\" rel=\"noreferrer noopener\"><strong><em>Microsoft Foundry<\/em><\/strong><\/a>-hosted LLM.<\/li>\n\n\n\n<li>The LLM outputs a&nbsp;<strong>score (0\u20131)<\/strong>&nbsp;indicating whether sentiment supports momentum continuation or signals reversal.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Portfolio Tilting<\/strong>\n<ul class=\"wp-block-list\">\n<li>LLM scores are normalized to [-1, +1].<\/li>\n\n\n\n<li>Baseline equal weights are tilted according to these scores.<\/li>\n\n\n\n<li>The&nbsp;<strong>top 10 stocks<\/strong>&nbsp;by adjusted weight form the final portfolio<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n\n<p>4.&nbsp;<strong>Visualization<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>A styled table is created using the&nbsp;<a href=\"https:\/\/gt.rstudio.com\/\" target=\"_blank\" rel=\"noreferrer noopener\"><em><strong><code>gt<\/code>&nbsp;package<\/strong><\/em><\/a>.<\/li>\n\n\n\n<li>Adjusted weights are color-coded (red\u2013green gradient).<\/li>\n\n\n\n<li>The final portfolio is saved as an image (<code>top10.png<\/code>).<\/li>\n<\/ul>\n\n\n\n<p><strong>Strategic Insight<\/strong><\/p>\n\n\n\n<p>This approach mirrors the methodology in the&nbsp;<a href=\"https:\/\/papers.ssrn.com\/sol3\/papers.cfm?abstract_id=5680782\" target=\"_blank\" rel=\"noreferrer noopener\"><em><strong>Swiss Finance Institute paper<\/strong><\/em><\/a>:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Momentum ranking<\/strong>&nbsp;provides the baseline.<\/li>\n\n\n\n<li><strong>LLM sentiment scoring<\/strong>&nbsp;refines stock selection and weighting.<\/li>\n\n\n\n<li><strong>Portfolio tilting<\/strong>&nbsp;integrates qualitative news signals into quantitative allocation.<\/li>\n<\/ul>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"r\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">library(httr)\nlibrary(jsonlite)\nlibrary(tidyquant)\nlibrary(tidyverse)\nlibrary(lubridate)\nlibrary(gt)\nlibrary(gtExtras)\nlibrary(scales)\nlibrary(showtext)\nlibrary(webshot2)\n \n# 1. Environment &amp; Auth Setup\nsysfonts::font_add_google(\"Roboto Slab\", \"roboto_slab\")\nshowtext_auto()\n \n# Azure &amp; Bing Credentials\nbing_key           &lt;- \"&lt;your-bing-key&gt;\"\nbing_endpoint      &lt;- \"&lt;your-bing-endpoint&gt;\"\nazure_llm_key      &lt;- \"&lt;your-llm-key&gt;\"\nazure_llm_endpoint &lt;- \"&lt;your-llm-endpoint&gt;\"\n \n# R Part (first): S&amp;P 500 Screening with Monthly Returns\nsp500_tickers &lt;- \n  tq_index(\"SP500\") %&gt;% \n  select(symbol, company)\n \n# Calculate YTD change\nmomentum_df &lt;- \n  sp500_tickers %&gt;%\n  tq_get(get = \"stock.prices\", from = floor_date(today(), \"year\")) %&gt;%\n  group_by(symbol) %&gt;%\n  arrange(date) %&gt;% # Ensure chronological order for first\/last functions\n  summarize(\n    total_return = (last(adjusted) \/ first(adjusted)) - 1, \n    .groups = \"drop\"\n  ) %&gt;%\n  inner_join(sp500_tickers, by = \"symbol\") %&gt;%\n  slice_max(total_return, n = 20) %&gt;%\n  select(symbol, company)\n \n# R Part (second): News Search and LLM Analysis\nanalyze_momentum_continuation &lt;- function(ticker, company_name) {\n   \n  # Construct the Bing News Search query: ticker + ' stock'\n  query_str &lt;- paste0(ticker, \" stock\")\n  news_url &lt;- paste0(bing_endpoint, \"v7.0\/news\/search\")\n   \n  # Call Bing News Search API\n  news_res &lt;- GET(news_url, add_headers(`Ocp-Apim-Subscription-Key` = bing_key), \n                  query = list(q = query_str, count = 5, freshness = \"Day\"))\n   \n  # Short pause to throttle calls and avoid rate limit errors\n  Sys.sleep(1)\n   \n  news_text &lt;- \"\"\n  if (status_code(news_res) == 200) {\n    content &lt;- fromJSON(content(news_res, \"text\", encoding = \"UTF-8\"))\n    if (length(content$value) &gt; 0) {\n      news_text &lt;- paste(content$value$name, content$value$description, collapse = \" | \")\n    }\n  }\n   \n  # Construct the LLM payload for Azure AI Foundry\n  prompt_payload &lt;- list(\n    messages = list(\n      list(role = \"system\", content = \"You are an LLM Enhanced Momentum Investing Agent.\"),\n      list(role = \"user\", content = paste0(\n        \"Headlines + Summaries for \", company_name, \" (\", ticker, \"): \", news_text,\n        \"\\nPerform sentiment analysis based on the last 5 days of news (lookback=5, horizon=5). \",\n        \"Infer whether sentiment supports momentum continuation or signals reversal. \",\n        \"Return a JSON object with two fields: 'subsector' (string) and 'llm_score' (string: probability 0-1).\"))\n    ),\n    temperature = 0.1\n  )\n   \n  llm_res &lt;- POST(url = azure_llm_endpoint, \n                  add_headers(`api-key` = azure_llm_key, `Content-Type` = \"application\/json\"),\n                  body = prompt_payload, encode = \"json\")\n   \n  if (status_code(llm_res) == 200) {\n    llm_out &lt;- fromJSON(content(llm_res, \"text\", encoding = \"UTF-8\"))\n    # Parse JSON response without using regex\n    llm_json_data &lt;- fromJSON(llm_out$choices$message$content)\n    return(as.data.frame(llm_json_data))\n  } else {\n    return(data.frame(subsector = \"N\/A\", llm_score = \"0.5\"))\n  }\n}\n \n# Execute Analysis: Merge top 20 tickers with LLM scores\nnews_scores_df &lt;- momentum_df %&gt;%\n  mutate(analysis = map2(symbol, company, analyze_momentum_continuation)) %&gt;%\n  unnest(analysis) %&gt;%\n  mutate(llm_score = as.numeric(llm_score))\n \n# R Part (final): Portfolio Tilting and Visualization\n# Normalize scores to [-1, +1] and tilt weights\ntilted_portfolio &lt;- news_scores_df %&gt;%\n  mutate(\n    norm_score = rescale(llm_score, to = c(-1, 1), from = c(0, 1)),\n    base_weight = 1 \/ n(),\n    adj_weight = base_weight * (1 + norm_score)\n  ) %&gt;%\n  mutate(adj_weight = adj_weight \/ sum(adj_weight)) %&gt;%\n  slice_max(adj_weight, n = 10)\n \n# Create gt visualization using original column names\nfinal_table &lt;- tilted_portfolio %&gt;%\n  select(company, subsector, adj_weight) %&gt;%\n  gt() %&gt;%\n  tab_header(title = \"Top 10 Tilted S&amp;P 500 Momentum Stocks\") %&gt;%\n  # Use cols_label for human-readable labels without renaming underlying columns\n  cols_label(\n    company = \"Company\", \n    subsector = \"Subsector\", \n    adj_weight = \"Adjusted Weight \"\n  ) %&gt;%\n  # Apply color intensity with scales::col_numeric\n  data_color(\n    columns = adj_weight, \n    colors = col_numeric(palette = c(\"red\", \"green\"), domain = NULL)\n  ) %&gt;%\n  fmt_percent(\n    columns = contains(\"adj_weight\"), \n    decimals = 2,\n    locale = \"en\"\n  ) %&gt;% \n  cols_align(align = \"center\") %&gt;%\n  opt_table_font(font = google_font(\"Roboto Slab\"))\n \n# Save the visualization as top10.png using webshot\ngtsave(final_table, \"top10.png\")<\/pre>\n\n\n\n<p><strong>Final Observation<\/strong><\/p>\n\n\n\n<p>Looking at the resulting portfolio, one striking feature is the\u00a0<strong>dominance of energy and petroleum companies<\/strong>. <\/p>\n\n\n\n<p>This heavy tilt toward energy is not random\u2014it reflects how&nbsp;<strong>geopolitical tensions (Iran and U.S.\u2013Israel war dynamics)<\/strong>&nbsp;have amplified the importance of oil and gas in global markets. News sentiment around these companies has been strongly supportive of continued momentum, pushing them into the top allocation slots.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>LLM-enhanced momentum investing combines traditional momentum signals with real-time news interpretation by large language models (LLMs). <\/p>\n","protected":false},"author":1729,"featured_media":183709,"comment_status":"open","ping_status":"closed","sticky":true,"template":"","format":"standard","meta":{"_acf_changed":true,"footnotes":""},"categories":[339,343,338,341,342],"tags":[21344,21345,21342,1407,21343,9056,1038,5545,11996,1044,1045],"contributors-categories":[21034],"class_list":{"0":"post-241131","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-data-science","8":"category-programing-languages","9":"category-ibkr-quant-news","10":"category-quant-development","11":"category-r-development","12":"tag-azure-ai-services","13":"tag-gt-package","14":"tag-large-language-model-llm","15":"tag-lubridate","16":"tag-microsoft-foundry","17":"tag-momentum-investing","18":"tag-sentiment-analysis","19":"tag-sharpe-ratio","20":"tag-sortino-ratio","21":"tag-tidyquant","22":"tag-tidyverse","23":"contributors-categories-datageeek"},"pp_statuses_selecting_workflow":false,"pp_workflow_action":"current","pp_status_selection":"publish","acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v26.9 (Yoast SEO v27.7) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Momentum Investing Enhanced by Microsoft Foundry-Hosted Large Language Model<\/title>\n<meta name=\"description\" content=\"LLM-enhanced momentum investing combines traditional momentum signals with real-time news interpretation by large language models (LLMs).\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.interactivebrokers.com\/campus\/wp-json\/wp\/v2\/posts\/241131\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Momentum Investing Enhanced by Microsoft Foundry-Hosted Large Language Model\" \/>\n<meta property=\"og:description\" content=\"LLM-enhanced momentum investing combines traditional momentum signals with real-time news interpretation by large language models (LLMs).\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/momentum-investing-enhanced-by-microsoft-foundry-hosted-large-language-model\/\" \/>\n<meta property=\"og:site_name\" content=\"IBKR Campus US\" \/>\n<meta property=\"article:published_time\" content=\"2026-04-06T16:53:39+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-04-06T16:55:03+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2023\/02\/globe-node-quant.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1000\" \/>\n\t<meta property=\"og:image:height\" content=\"563\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Selcuk Disci\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Selcuk Disci\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\n\t    \"@context\": \"https:\\\/\\\/schema.org\",\n\t    \"@graph\": [\n\t        {\n\t            \"@type\": \"NewsArticle\",\n\t            \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/ibkr-quant-news\\\/momentum-investing-enhanced-by-microsoft-foundry-hosted-large-language-model\\\/#article\",\n\t            \"isPartOf\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/ibkr-quant-news\\\/momentum-investing-enhanced-by-microsoft-foundry-hosted-large-language-model\\\/\"\n\t            },\n\t            \"author\": {\n\t                \"name\": \"Selcuk Disci\",\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#\\\/schema\\\/person\\\/7dbe9bd8161c35e2855152a7a652dbb7\"\n\t            },\n\t            \"headline\": \"Momentum Investing Enhanced by Microsoft Foundry-Hosted Large Language Model\",\n\t            \"datePublished\": \"2026-04-06T16:53:39+00:00\",\n\t            \"dateModified\": \"2026-04-06T16:55:03+00:00\",\n\t            \"mainEntityOfPage\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/ibkr-quant-news\\\/momentum-investing-enhanced-by-microsoft-foundry-hosted-large-language-model\\\/\"\n\t            },\n\t            \"wordCount\": 712,\n\t            \"commentCount\": 0,\n\t            \"publisher\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#organization\"\n\t            },\n\t            \"image\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/ibkr-quant-news\\\/momentum-investing-enhanced-by-microsoft-foundry-hosted-large-language-model\\\/#primaryimage\"\n\t            },\n\t            \"thumbnailUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2023\\\/02\\\/globe-node-quant.png\",\n\t            \"keywords\": [\n\t                \"Azure AI Services\",\n\t                \"gt package\",\n\t                \"Large language model (LLM)\",\n\t                \"Lubridate\",\n\t                \"Microsoft Foundry\",\n\t                \"Momentum Investing\",\n\t                \"Sentiment Analysis\",\n\t                \"Sharpe Ratio\",\n\t                \"Sortino ratio\",\n\t                \"tidyquant\",\n\t                \"tidyverse\"\n\t            ],\n\t            \"articleSection\": [\n\t                \"Data Science\",\n\t                \"Programming Languages\",\n\t                \"Quant\",\n\t                \"Quant Development\",\n\t                \"R Development\"\n\t            ],\n\t            \"inLanguage\": \"en-US\",\n\t            \"potentialAction\": [\n\t                {\n\t                    \"@type\": \"CommentAction\",\n\t                    \"name\": \"Comment\",\n\t                    \"target\": [\n\t                        \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/ibkr-quant-news\\\/momentum-investing-enhanced-by-microsoft-foundry-hosted-large-language-model\\\/#respond\"\n\t                    ]\n\t                }\n\t            ]\n\t        },\n\t        {\n\t            \"@type\": \"WebPage\",\n\t            \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/ibkr-quant-news\\\/momentum-investing-enhanced-by-microsoft-foundry-hosted-large-language-model\\\/\",\n\t            \"url\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/ibkr-quant-news\\\/momentum-investing-enhanced-by-microsoft-foundry-hosted-large-language-model\\\/\",\n\t            \"name\": \"Momentum Investing Enhanced by Microsoft Foundry-Hosted Large Language Model | IBKR Campus US\",\n\t            \"isPartOf\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#website\"\n\t            },\n\t            \"primaryImageOfPage\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/ibkr-quant-news\\\/momentum-investing-enhanced-by-microsoft-foundry-hosted-large-language-model\\\/#primaryimage\"\n\t            },\n\t            \"image\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/ibkr-quant-news\\\/momentum-investing-enhanced-by-microsoft-foundry-hosted-large-language-model\\\/#primaryimage\"\n\t            },\n\t            \"thumbnailUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2023\\\/02\\\/globe-node-quant.png\",\n\t            \"datePublished\": \"2026-04-06T16:53:39+00:00\",\n\t            \"dateModified\": \"2026-04-06T16:55:03+00:00\",\n\t            \"description\": \"LLM-enhanced momentum investing combines traditional momentum signals with real-time news interpretation by large language models (LLMs).\",\n\t            \"inLanguage\": \"en-US\",\n\t            \"potentialAction\": [\n\t                {\n\t                    \"@type\": \"ReadAction\",\n\t                    \"target\": [\n\t                        \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/ibkr-quant-news\\\/momentum-investing-enhanced-by-microsoft-foundry-hosted-large-language-model\\\/\"\n\t                    ]\n\t                }\n\t            ]\n\t        },\n\t        {\n\t            \"@type\": \"ImageObject\",\n\t            \"inLanguage\": \"en-US\",\n\t            \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/ibkr-quant-news\\\/momentum-investing-enhanced-by-microsoft-foundry-hosted-large-language-model\\\/#primaryimage\",\n\t            \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2023\\\/02\\\/globe-node-quant.png\",\n\t            \"contentUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2023\\\/02\\\/globe-node-quant.png\",\n\t            \"width\": 1000,\n\t            \"height\": 563,\n\t            \"caption\": \"Measuring Geopolitical Risk\"\n\t        },\n\t        {\n\t            \"@type\": \"WebSite\",\n\t            \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#website\",\n\t            \"url\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/\",\n\t            \"name\": \"IBKR Campus US\",\n\t            \"description\": \"Financial Education from Interactive Brokers\",\n\t            \"publisher\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#organization\"\n\t            },\n\t            \"potentialAction\": [\n\t                {\n\t                    \"@type\": \"SearchAction\",\n\t                    \"target\": {\n\t                        \"@type\": \"EntryPoint\",\n\t                        \"urlTemplate\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/?s={search_term_string}\"\n\t                    },\n\t                    \"query-input\": {\n\t                        \"@type\": \"PropertyValueSpecification\",\n\t                        \"valueRequired\": true,\n\t                        \"valueName\": \"search_term_string\"\n\t                    }\n\t                }\n\t            ],\n\t            \"inLanguage\": \"en-US\"\n\t        },\n\t        {\n\t            \"@type\": \"Organization\",\n\t            \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#organization\",\n\t            \"name\": \"Interactive Brokers\",\n\t            \"alternateName\": \"IBKR\",\n\t            \"url\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/\",\n\t            \"logo\": {\n\t                \"@type\": \"ImageObject\",\n\t                \"inLanguage\": \"en-US\",\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#\\\/schema\\\/logo\\\/image\\\/\",\n\t                \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2024\\\/05\\\/ibkr-campus-logo.jpg\",\n\t                \"contentUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2024\\\/05\\\/ibkr-campus-logo.jpg\",\n\t                \"width\": 669,\n\t                \"height\": 669,\n\t                \"caption\": \"Interactive Brokers\"\n\t            },\n\t            \"image\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#\\\/schema\\\/logo\\\/image\\\/\"\n\t            },\n\t            \"publishingPrinciples\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/about-ibkr-campus\\\/\",\n\t            \"ethicsPolicy\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/cyber-security-notice\\\/\"\n\t        },\n\t        {\n\t            \"@type\": \"Person\",\n\t            \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#\\\/schema\\\/person\\\/7dbe9bd8161c35e2855152a7a652dbb7\",\n\t            \"name\": \"Selcuk Disci\",\n\t            \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/author\\\/selcukdisci\\\/\"\n\t        }\n\t    ]\n\t}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Momentum Investing Enhanced by Microsoft Foundry-Hosted Large Language Model","description":"LLM-enhanced momentum investing combines traditional momentum signals with real-time news interpretation by large language models (LLMs).","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.interactivebrokers.com\/campus\/wp-json\/wp\/v2\/posts\/241131\/","og_locale":"en_US","og_type":"article","og_title":"Momentum Investing Enhanced by Microsoft Foundry-Hosted Large Language Model","og_description":"LLM-enhanced momentum investing combines traditional momentum signals with real-time news interpretation by large language models (LLMs).","og_url":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/momentum-investing-enhanced-by-microsoft-foundry-hosted-large-language-model\/","og_site_name":"IBKR Campus US","article_published_time":"2026-04-06T16:53:39+00:00","article_modified_time":"2026-04-06T16:55:03+00:00","og_image":[{"width":1000,"height":563,"url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2023\/02\/globe-node-quant.png","type":"image\/png"}],"author":"Selcuk Disci","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Selcuk Disci","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"NewsArticle","@id":"https:\/\/ibkrcampus.com\/campus\/ibkr-quant-news\/momentum-investing-enhanced-by-microsoft-foundry-hosted-large-language-model\/#article","isPartOf":{"@id":"https:\/\/ibkrcampus.com\/campus\/ibkr-quant-news\/momentum-investing-enhanced-by-microsoft-foundry-hosted-large-language-model\/"},"author":{"name":"Selcuk Disci","@id":"https:\/\/ibkrcampus.com\/campus\/#\/schema\/person\/7dbe9bd8161c35e2855152a7a652dbb7"},"headline":"Momentum Investing Enhanced by Microsoft Foundry-Hosted Large Language Model","datePublished":"2026-04-06T16:53:39+00:00","dateModified":"2026-04-06T16:55:03+00:00","mainEntityOfPage":{"@id":"https:\/\/ibkrcampus.com\/campus\/ibkr-quant-news\/momentum-investing-enhanced-by-microsoft-foundry-hosted-large-language-model\/"},"wordCount":712,"commentCount":0,"publisher":{"@id":"https:\/\/ibkrcampus.com\/campus\/#organization"},"image":{"@id":"https:\/\/ibkrcampus.com\/campus\/ibkr-quant-news\/momentum-investing-enhanced-by-microsoft-foundry-hosted-large-language-model\/#primaryimage"},"thumbnailUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2023\/02\/globe-node-quant.png","keywords":["Azure AI Services","gt package","Large language model (LLM)","Lubridate","Microsoft Foundry","Momentum Investing","Sentiment Analysis","Sharpe Ratio","Sortino ratio","tidyquant","tidyverse"],"articleSection":["Data Science","Programming Languages","Quant","Quant Development","R Development"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/ibkrcampus.com\/campus\/ibkr-quant-news\/momentum-investing-enhanced-by-microsoft-foundry-hosted-large-language-model\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/ibkrcampus.com\/campus\/ibkr-quant-news\/momentum-investing-enhanced-by-microsoft-foundry-hosted-large-language-model\/","url":"https:\/\/ibkrcampus.com\/campus\/ibkr-quant-news\/momentum-investing-enhanced-by-microsoft-foundry-hosted-large-language-model\/","name":"Momentum Investing Enhanced by Microsoft Foundry-Hosted Large Language Model | IBKR Campus US","isPartOf":{"@id":"https:\/\/ibkrcampus.com\/campus\/#website"},"primaryImageOfPage":{"@id":"https:\/\/ibkrcampus.com\/campus\/ibkr-quant-news\/momentum-investing-enhanced-by-microsoft-foundry-hosted-large-language-model\/#primaryimage"},"image":{"@id":"https:\/\/ibkrcampus.com\/campus\/ibkr-quant-news\/momentum-investing-enhanced-by-microsoft-foundry-hosted-large-language-model\/#primaryimage"},"thumbnailUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2023\/02\/globe-node-quant.png","datePublished":"2026-04-06T16:53:39+00:00","dateModified":"2026-04-06T16:55:03+00:00","description":"LLM-enhanced momentum investing combines traditional momentum signals with real-time news interpretation by large language models (LLMs).","inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/ibkrcampus.com\/campus\/ibkr-quant-news\/momentum-investing-enhanced-by-microsoft-foundry-hosted-large-language-model\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ibkrcampus.com\/campus\/ibkr-quant-news\/momentum-investing-enhanced-by-microsoft-foundry-hosted-large-language-model\/#primaryimage","url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2023\/02\/globe-node-quant.png","contentUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2023\/02\/globe-node-quant.png","width":1000,"height":563,"caption":"Measuring Geopolitical Risk"},{"@type":"WebSite","@id":"https:\/\/ibkrcampus.com\/campus\/#website","url":"https:\/\/ibkrcampus.com\/campus\/","name":"IBKR Campus US","description":"Financial Education from Interactive Brokers","publisher":{"@id":"https:\/\/ibkrcampus.com\/campus\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/ibkrcampus.com\/campus\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/ibkrcampus.com\/campus\/#organization","name":"Interactive Brokers","alternateName":"IBKR","url":"https:\/\/ibkrcampus.com\/campus\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ibkrcampus.com\/campus\/#\/schema\/logo\/image\/","url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/05\/ibkr-campus-logo.jpg","contentUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/05\/ibkr-campus-logo.jpg","width":669,"height":669,"caption":"Interactive Brokers"},"image":{"@id":"https:\/\/ibkrcampus.com\/campus\/#\/schema\/logo\/image\/"},"publishingPrinciples":"https:\/\/www.interactivebrokers.com\/campus\/about-ibkr-campus\/","ethicsPolicy":"https:\/\/www.interactivebrokers.com\/campus\/cyber-security-notice\/"},{"@type":"Person","@id":"https:\/\/ibkrcampus.com\/campus\/#\/schema\/person\/7dbe9bd8161c35e2855152a7a652dbb7","name":"Selcuk Disci","url":"https:\/\/www.interactivebrokers.com\/campus\/author\/selcukdisci\/"}]}},"jetpack_featured_media_url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2023\/02\/globe-node-quant.png","_links":{"self":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/posts\/241131","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/users\/1729"}],"replies":[{"embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/comments?post=241131"}],"version-history":[{"count":0,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/posts\/241131\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/media\/183709"}],"wp:attachment":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/media?parent=241131"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/categories?post=241131"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/tags?post=241131"},{"taxonomy":"contributors-categories","embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/contributors-categories?post=241131"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}