真实市场冲击建模让强化学习交易更可靠
Realistic Market Impact Modeling for Reinforcement Learning Trading Environments
- 基于阿尔姆格伦-克里斯框架构建非线性市场冲击模型
- 实测显示交易成本从20万降至8千,换手率从19%降到1%
- 适合量化交易研究者和需要真实回测的RL开发者
强化学习在交易中展现潜力,但多数开源回测环境假设交易成本可忽略或固定,导致代理学习到的行为在真实执行中失效。我们引入三个兼容Gymnasium的交易环境——股票交易、保证金交易和组合优化,集成基于Almgren-Chriss框架与经验验证的平方根冲击定律的非线性市场冲击模型。每个环境支持可插拔的成本模型、具有指数衰减的永久冲击追踪及完整的逐笔交易日志。我们在NASDAQ-100上评估五种DRL算法(A2C、PPO、DDPG、SAC、TD3),对比固定10 bps基线与经过Optuna调优的AC模型。结果表明:(i) 成本模型显著改变绝对表现和算法相对排名;(ii) AC模型使日均成本从20万美元降至8千美元,换手率从19%降至1%;(iii) 超参数优化对抑制异常交易至关重要,成本最高降低82%;(iv) 算法与成本模型交互强烈依赖环境,例如在保证金交易中,DDPG的外推夏普比从-2.1升至0.3,而SAC则从-0.5降至-1.2。完整套件作为FinRL-Meta的开源扩展发布。
原文摘要 · Abstract (English)
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.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。