Speakers
Description
Franky: An Intelligent Agent for Stock Portfolio
Management Using Large Language Models and
Deep Reinforcement Learning
1st Mikołaj Zawada∗
Faculty of Electrical Engineering
Warsaw University of Technology
Warsaw, Poland
mikolaj.zawada.stud@pw.edu.pl
2nd Mateusz Bartosik∗
Faculty of Electrical Engineering
Warsaw University of Technology
Warsaw, Poland
mateusz.bartosik.stud@pw.edu.pl
3rd ˙Zaneta ´Swiderska-Chadaj, PhD†
Faculty of Electrical Engineering
Warsaw University of Technology
Warsaw, Poland
zaneta.swiderska@pw.edu.pl
I. INTRODUCTION
This paper introduces an innovative intelligent trading agent
designed for autonomous stock portfolio management, inte-
grating Large Language Models (LLMs) and Deep Reinforce-
ment Learning (DRL). The core objective was to develop a
trading agent capable of effectively managing a diversified
stock portfolio by synthesizing quantitative market data with
qualitative insights derived from real-time financial news and
corporate reports.
The motivation behind this approach arises from limitations
observed in conventional trading algorithms, which predom-
inantly rely on historical price data and technical indicators
while frequently neglecting critical qualitative information.
Existing market solutions typically separate numerical analysis
and text-driven sentiment analysis, thus failing to fully exploit
the synergistic potential of these data sources. By contrast, the
proposed method uniquely integrates these elements through
a combined architecture inspired by FINMEM [1] and FinRL
[2] frameworks.
The proposed system operates through a multi-layered ap-
proach, employing DRL agents trained on historical numerical
data and stock-specific memory module that prioritize and
manage textual information. Memory module continuously
captures, processes, and contextualizes incoming data streams
into structured, actionable insights. Data is being scraped and
processed in real-time from predefined and trusted sources on
the Internet, allowing a rapid reaction to ever changing market
environment. LLM serve as an advanced interpretative engine,
conducting sentiment and contextual analyses of news articles
to anticipate market reactions. DRL Agent is responsible for
a quantitative analysis of portfolio assets and suggesting an
optimized resources allocation. It considers how assets move
relative to each other, risks associated with each asset, techni-
cal indicators and historical data. Agent is using the Advantage
Actor-Critic [3] algorithm that, after a series of backtesting,
outperformed DDPG, PPO, TD3 and SAC [4] by around 5%-
20%. Ultimately, stock-level recommendations are integrated
by a dedicated portfolio-level LLM, considering portfolio
constraints, diversification, risk tolerance, and available funds
to formulate cohesive and strategic trading decisions. As many
LLMs of various architectures are currently available, such a
selection of them was taken into consideration which enabled
verification of the difference between reasoning and non-
reasoning models.
Validation of the system’s performance was conducted
through rigorous backtesting across diverse historical market
conditions, employing metrics such as cumulative returns
and risk-adjusted returns against benchmark trading strategies.
Initial results (return of around 36%) demonstrate the superior
performance and adaptability of the proposed system, outper-
forming conventional DRL-based and purely sentiment-based
methods, particularly in volatile market conditions.
Future development will concentrate on optimizing the
portfolio manager component, exploring dynamic rebalancing
strategies and refining its scalability and adaptability to real-
time trading environments. This work not only enhances
autonomous trading technologies but also provides valuable
insights into how hybrid AI architectures can revolutionize
financial market analysis and decision-making.
Index Terms—Large Language Models, Deep Reinforcement
Learning, Stock Trading, Portfolio Management
∗ Equal contribution
† Supervisor
REFERENCES
[1] Y. Yu, H. Li, Z. Chen, Y. Jiang, Y. Li, D. Zhang, R. Liu, J. W. Suchow,
and K. Khashanah, “Finmem: A performance-enhanced llm trading agent
with layered memory and character design,” 2023. [Online]. Available:
https://arxiv.org/abs/2311.13743
[2] X.-Y. Liu, H. Yang, Q. Chen, R. Zhang, L. Yang, B. Xiao, and C. D.
Wang, “Finrl: A deep reinforcement learning library for automated
stock trading in quantitative finance,” 2022. [Online]. Available:
https://arxiv.org/abs/2011.09607
[3] G. Song, T. Zhao, X. Ma, P. Lin, and C. Cui, “Reinforcement learning-
based portfolio optimization with deterministic state transition,” Informa-
tion Sciences, vol. 690, p. 121538, 2025.
[4] S. Liu, “An evaluation of ddpg, td3, sac, and ppo: Deep reinforcement
learning algorithms for controlling continuous system,” in Proceedings of
the 2023 International Conference on Data Science, Advanced Algorithm
and Intelligent Computing (DAI 2023). Atlantis Press, 2024, pp. 15–24.
[Online]. Available: https://doi.org/10.2991/978-94-6463-370-23