Reinforcement learning (RL) has shown promise for trading, yet most open-source backtesting environments assume negligible or fixed transaction costs, causing agents to learn trading behaviors that fail under realistic execution. We introduce three Gymnasium-compatible trading environments -- MACE (Market-Adjusted Cost Execution) stock trading, margin trading, and portfolio optimization -- that integrate nonlinear market impact models grounded in the Almgren-Chriss framework and the empirically validated square-root impact law. Each environment provides pluggable cost models, permanent impact tracking with exponential decay, and comprehensive trade-level logging. We evaluate five DRL algorithms (A2C, PPO, DDPG, SAC, TD3) on the NASDAQ-100, comparing a fixed 10 bps baseline against the AC model with Optuna-tuned hyperparameters. Our results show that (i) the cost model materially changes both absolute performance and the relative ranking of algorithms across all three environments; (ii) the AC model produces dramatically different trading behavior, e.g., daily costs dropping from $200k to $8k with turnover falling from 19% to 1%; (iii) hyperparameter optimization is essential for constraining pathological trading, with costs dropping up to 82%; and (iv) algorithm-cost model interactions are strongly environment-specific, e.g., DDPG's OOS Sharpe jumps from -2.1 to 0.3 under AC in margin trading while SAC's drops from -0.5 to -1.2. We release the full suite as an open-source extension to FinRL-Meta.


翻译:强化学习在交易领域展现出潜力,但大多数开源回测环境假设交易成本可忽略或固定,导致智能体学习到的交易行为在真实执行中失效。我们引入三个兼容Gymnasium的交易环境——MACE(市场调整成本执行)股票交易、保证金交易和投资组合优化——这些环境集成了基于Almgren-Chriss框架和经实证验证的平方根冲击法则的非线性市场冲击模型。每个环境提供可插拔成本模型、具有指数衰减的永久冲击追踪以及全面的交易级日志记录。我们在纳斯达克100指数上评估了五种深度强化学习算法(A2C、PPO、DDPG、SAC、TD3),将固定10个基点的基线模型与经Optuna调优超参数的AC模型进行比较。结果表明:(i)成本模型显著改变了所有三个环境中算法的绝对表现和相对排名;(ii)AC模型产生截然不同的交易行为,例如每日成本从20万美元降至8000美元,换手率从19%降至1%;(iii)超参数优化对于约束病态交易至关重要,成本降幅最高达82%;(iv)算法与成本模型的交互具有强烈的环境特异性,例如在保证金交易中,DDPG的样本外夏普比率从-2.1跃升至0.3,而SAC的则从-0.5降至-1.2。我们将整套工具作为FinRL-Meta的开源扩展发布。

0
下载
关闭预览

相关内容

在数学和计算机科学之中,算法(Algorithm)为一个计算的具体步骤,常用于计算、数据处理和自动推理。精确而言,算法是一个表示为有限长列表的有效方法。算法应包含清晰定义的指令用于计算函数。 来自维基百科: 算法
《用于建模系统攻击路径的强化学习环境》
专知会员服务
22+阅读 · 3月5日
《可解释性强化学习模型》
专知会员服务
25+阅读 · 2月24日
深度强化学习中的奖励模型:综述
专知会员服务
29+阅读 · 2025年6月20日
基于模型的强化学习综述
专知
42+阅读 · 2022年7月13日
强化学习《奖励函数设计: Reward Shaping》详细解读
深度强化学习实验室
20+阅读 · 2020年9月1日
探索(Exploration)还是利用(Exploitation)?强化学习如何tradeoff?
深度强化学习实验室
13+阅读 · 2020年8月23日
基于虚拟现实环境的深度学习模型构建
MOOC
24+阅读 · 2019年9月28日
基于强化学习的量化交易框架
机器学习研究会
30+阅读 · 2018年2月22日
国家自然科学基金
1+阅读 · 2017年12月31日
国家自然科学基金
43+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
11+阅读 · 2013年12月31日
国家自然科学基金
11+阅读 · 2012年12月31日
国家自然科学基金
23+阅读 · 2009年12月31日
VIP会员
最新内容
综述 | 3D场景图:开放挑战与未来方向
专知会员服务
3+阅读 · 6月22日
21世纪的无人机战争
专知会员服务
3+阅读 · 6月22日
《量子技术的军事任务技术适配与利用》
专知会员服务
3+阅读 · 6月22日
美国从乌克兰无人机战争中学习经验
专知会员服务
7+阅读 · 6月21日
ICML 2026 | 面向视觉语言模型的语义鲁棒性认证
专知会员服务
5+阅读 · 6月21日
相关基金
国家自然科学基金
1+阅读 · 2017年12月31日
国家自然科学基金
43+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
11+阅读 · 2013年12月31日
国家自然科学基金
11+阅读 · 2012年12月31日
国家自然科学基金
23+阅读 · 2009年12月31日
Top
微信扫码咨询专知VIP会员