Papers › Margin Trader: A Reinforcement Learning Framework for Portfolio Management with Margin...

Margin Trader: A Reinforcement Learning Framework for Portfolio Management with Margin and Constraints

25 Nov 2023The 4th ACM International Conference on AI in Finance 2023 11archive 2025-07-28

Jingyi Gu, Wenlu Du, A M Muntasir Rahman, Guiling Wang

In the field of portfolio management using reinforcement learn- ing, existing approaches have mainly focused on cash-only trading, overlooking the potential benefits and risks of margin trading. Incor- porating margin accounts and their constraints, especially in short sale scenarios, is crucial yet often neglected. To address this gap, we make the first attempt to propose Margin Trader, an innovative and adaptive reinforcement learning framework designed for margin trading in the stock market. Margin Trader integrates margin ac- counts and constraints into a realistic trading environment for both long and short positions. The framework aims to balance profit maximization and risk management through the Margin Adjust- ment Module and the Maintenance Detection Module. Margin Trader supports various Deep Reinforcement Learning (DRL) algorithms and offers traders the flexibility to customize critical settings, such as equity allocation, margin ratios, and maintenance requirements, to suit diverse market conditions, individual preferences, and risk tolerance. Experimental results demonstrate that Margin Trader effectively learns profitable trading strategies and hedges risks in both bullish and bearish markets, outperforming other baseline models with the highest Sharpe ratio.

PaperPDFCode

Code

JingyiGu/Margin-Trader officialmentioned in paperpytorch report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

Not run by Syntology. Nothing on this page verifies that the listed code works.

Tasks

Deep Reinforcement LearningManagementPortfolio OptimizationReinforcement LearningReinforcement Learning (RL)reinforcement-learning

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections