Huang Zhendai, Zhang Zhen, Hua Cheng, Liao Bolin, Li Shuai
College of Computer Science and Engineering, Jishou University, Jishou, 416000, China.
School of Electronic Information and Electrical Engineering, Changsha University, Changsha, 410073, China.
Sci Rep. 2024 Nov 4;14(1):26681. doi: 10.1038/s41598-024-77925-2.
In the financial field, constructing efficient investment portfolios is a focal point of research, encompassing asset selection and optimization of asset allocation. With the advancements in Large Language Models (LLMs), generative Artificial Intelligence (AI) tools have showcased capabilities never seen before. However, the black-box nature of these tools renders their outputs difficult to interpret directly, often necessitating iterative fine-tuning to align with users' expected outcomes. This study presents a structured prompt framework specifically designed for stock selection, aiming to provide direct and interpretable stock-selecting tools for investors of various levels. By creating representative scenarios and combining them into different cases for experimentation, we can explore how the construction of prompts influences the responses generated by generative AI tools. Additionally, this paper proposes a novel algorithm that combines the Nonlinear-Activated Beetle Antennae Search strategy with the Egret Swarm Optimization Algorithm (NBESOA) to address the Mean-Variance Portfolio Selection problem with Transaction Costs and Cardinality Constraints (MVPS-TCCC), utilizing real stock market data to construct portfolios based on generative AI tools recommendations. Simulation results indicate that, compared to other algorithms, NBESOA prefers optimizing portfolio configurations to achieve the highest Sharpe Ratio with the strictest constraints, bringing the outcomes closer to the portfolio's efficient frontier.
在金融领域,构建高效投资组合是研究的重点,包括资产选择和资产配置优化。随着大语言模型(LLMs)的发展,生成式人工智能(AI)工具展现出了前所未有的能力。然而,这些工具的黑箱性质使得其输出难以直接解释,通常需要反复微调以符合用户的预期结果。本研究提出了一个专门为股票选择设计的结构化提示框架,旨在为不同水平的投资者提供直接且可解释的股票选择工具。通过创建代表性场景并将其组合成不同案例进行实验,我们可以探究提示的构建如何影响生成式AI工具生成的响应。此外,本文提出了一种将非线性激活甲虫触角搜索策略与白鹭群优化算法(NBESOA)相结合的新算法,以解决带有交易成本和基数约束的均值-方差投资组合选择问题(MVPS-TCCC),利用真实股票市场数据基于生成式AI工具的建议构建投资组合。模拟结果表明,与其他算法相比,NBESOA更倾向于优化投资组合配置,以便在最严格的约束下实现最高夏普比率,使结果更接近投资组合的有效前沿。