Integrating LLM-Generated Views into Mean-Variance Optimization Using the Black-Litterman Model

Youngbin Lee, Yejin Kim, Suin Kim, Yongjae Lee · 2025

Read Integrating LLM-Generated Views into Mean-Variance Optimization Using the Black-Litterman Model by Youngbin Lee, Yejin Kim, Suin Kim, Yongjae Lee (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2504-14345.txt.

Introduction

Youngbin Lee and co-authors feed language model forecasts into a classic portfolio method, in a paper from 2025. The Black-Litterman model blends market balance with an investor's views to build a steadier portfolio than raw optimization gives. Its weak point is that views usually come from human judgment, with no systematic way to form them.

The team turns model generated return forecasts, plus each model's own uncertainty, into the views and confidence levels the portfolio method needs. A backtest on the large United States index stocks showed portfolios led by the best models beating standard baselines on raw and risk adjusted returns. Each language model showed its own steady investing style. Picking a model is thus a style choice, the authors argue, not a hunt for one best forecaster.

Catalog record

CREATORYoungbin Lee, Yejin Kim, Suin Kim, Yongjae Lee
YEAR2025
COLLECTIONPAPERS
FORMATTXT
FILE SIZE23 KB
VERSION1.0
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2504-14345

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

Integrating LLM-Generated Views into Mean-Variance Optimization Using the Black-Litterman Model Youngbin Lee, Yejin Kim, Suin Kim, Yongjae Lee Abstract Portfolio optimization faces challenges due to the sensitivity in traditional mean-variance models. The Black-Litterman model mitigates this by integrating investor views, but defining these views remains difficult. This study explores the integration of large language models (LLMs) generated views into portfolio optimization using the Black-Litterman framework. Our method leverages LLMs to estimate expected stock returns from historical prices and company metadata, incorporating uncertainty through the variance in predictions. We conduct a backtest of the LLM-optimized portfolios from June 2024 to February 2025, rebalancing biweekly using the previous two weeks of price data. As baselines, we compare against the S&P 500, an equal-weighted portfolio, and a traditional mean-variance optimized portfolio constructed using the same set of stocks. Empirical results suggest that different LLMs exhibit varying levels of predictive optimism and confidence stability, which impact portfolio performance. The source code and data are available at https://github.com/youngandbin/LLM-MVO-BLM . 1 Introduction Portfolio optimization is a fundamental problem in finance, traditionally approached using mean-variance optimization Markowitz 1952 . However, a well-known limitation of mean-variance optimization is its sensitivity to input parameters, such as expected returns and covariance estimates. The Black-Litterman asset allocation model Black & Litterman 1992 was introduced to mitigate these problems by incorporating investor views into expected returns through a Bayesian framework. Although the Black-Litterman model remains widely used in asset management industry, including Goldman Sachs, a key challenge lies in how to define and quantify these views in a systematic and reliable manner. Recent advances in LLMs have shown promise in processing large amounts of financial data and generating insights that could potentially be used to formulate investor views Zhao et al. 2024 and optimized portfolios Hwang et al. 2025 . This raises the question: can we leverage LLMs to generate structured and data-driven views that enhance portfolio construction while maintaining the robustness of the Black-Litterman framework? Traditional investor views are based on subjective judgment, expert analysis, or historical trends Idzorek 2007 ; Kara et al. 2019 . Some approaches use quantitative forecasting models Feng et al. 2019 ; Wang et al. 2022 , but these require extensive feature engineering and assumptions. A major limitation is the lack of an automated, scalable method to generate investor views that dynamically adapt to market conditions. We propose a novel approach that integrates LLM-generated views into the mean-variance optimization using the Black-Litterman model. Our approach leverages LLMs to predict expected stock returns based on historical performance and company metadata, systematically incorporating uncertainty quantification as a variance of LLM predictions into the model. This method allows for a data-driven, automated, and scalable way to generate views, reducing human bias in portfolio construction. We evaluate recent open source models including LLaMA-3.1-8B Dubey et al. 2024 , Gemma-7B Team et al. 2024 , and Qwen-2-7B Yang et al. 2024 , as well as the proprietary GPT-4o-mini OpenAI 2024 1 1 1 Although the exact size of GPT-4o-mini has not been officially disclosed, Abacha et al. 2024 estimate it to be within the 8 billion parameter range, making it comparable to the open-source models used in our study. , in generating views for S&P 500 constituents. All selected models are of comparable size, enabling a fair evaluation under similar computational constraints. The predicted returns are integrated into the Black-Litterman model, with view confidence quantified using the variance of multiple responses from LLMs. The resulting optimized portfolio is backtested from June 2024 to February 2025 against the S&P 500 benchmarks, with performance evaluated using various metrics including Sharpe ratio, cumulative return, and maximum drawdown. 2 Data and Methodology 2.1 Data Description We use historical stock price data from the top 50 S&P 500 constituents by market capitalization, as of March 26, 2025, sourced from Yahoo Finance to evaluate our proposed methodology. The dataset spans from June 2024 to February 2025 . To ensure adaptability to changing market conditions, the portfolio is rebalanced every two weeks. At the beginning of each two-week period, the LLM is provided with the past two weeks of stock price data to generate average return predictions for the following two weeks, and a new portfolio is constructed accordingly. This process is repeated iteratively, ensuring that each rebalancing is based on the most recent available data. As a result, for the evaluation of portfolio performance, we assess the outcomes of trading over an 8-month period, using portfolios constructed with views generated by the LLM. In addition, we incorporate company metadata (detailed in Figure 1 ) to improve the contextual understanding of the LLM and improve return predictions. 2.2 Selection of Large Language Models To incorporate predictive views, we employ four models with the most recent versions available, each with a knowledge cutoff prior to the evaluation period of our dataset. This ensures that the models do not have direct exposure to future stock performance, preserving the validity of the evaluation. We used instruction-tuned models to ensure consistency in the generated return predictions. • LLaMA-3.1-8B : A scalable version of the LLaMA-3.1 family, optimized for text comprehension, reasoning, and numerical tasks. Released in July 2024 by Meta. • Gemma-7B : A lightweight yet high-performance model designed for general natural language processing tasks. Released in February 2024 by Google DeepMind. • Qwen-2-7B : A scalable and efficient model with a particular focus on fine-grained reasoning and multi-turn interactions. Released in June 2024 by Alibaba. • GPT-4o-mini : A lightweight version of GPT-4o , optimized for cost-effective reasoning and fast inference. Released in July 2024 by OpenAI. We used vLLM Kwon et al. 2023 for optimized inference. Each model was prompted to predict the average daily return for the next two weeks based on the past two weeks of stock returns and company metadata. To quantify confidence in the predictions, each model was queried 10 times per stock, and the variance of the responses was used as a measure of confidence. 2.3 LLM Prompt Templates To extract predictive views from LLMs, we employ a structured prompt designed to estimate expected stock returns based on historical data and company metadata, as illustrated in Figure 1 . To assess the LLMs’ ability to predict future stock performance, we provide essential inputs for return forecasting: a time series of past daily returns and company metadata for each stock. These inputs are included in the user prompt alongside the system prompt, allowing the LLMs to generate informed return estimates based on relevant historical and contextual data. System prompt for making views You are providing analysis on {{DATE}} . Predict the average daily return for the next two weeks based on the information provided about a stock’s past performance You will receive the following inputs: • Daily Returns : The stock’s daily returns, a time-series from the past two weeks. • Company Information : – Ticker: The stock symbol. – Company Name: The name of the company. – GICS Sector: The Global Industry Classification Standard sector. – GICS Sub-Industry: The sub-industry classification. # Steps 1. Analyze the Time-Series Data: Review the historical daily returns to identify patterns, trends, or anomalies that may affect future performance. 2. Incorporate Company Information: Use the details from the GICS sector

Read the complete text