用利润导向损失函数,让神经网络直接学炒股赚钱。
Directly Learning Stock Trading Strategies Through Profit Guided Loss Functions
- 设计四种利润驱动的损失函数,让模型直接优化交易收益。
- 在标普500 50只股票上,三年回测收益超50%,超越强化学习方法。
- 适合想用深度学习做量化交易的研究者或开发者参考。
由于股市高度波动,做出盈利的交易决策极为困难。为此,我们提出四种新颖的损失函数,根据买入或做空股票的潜在盈亏来引导投资组合决策,使任意神经网络都能直接学习有效交易策略。尽管市场波动剧烈,使用这些损失函数训练时间序列模型(如Crossformer)后,在50只标普500成分股组合上的表现显著优于基准强化学习方法和买入持有策略。以2021、2022和2023年为测试期,采用最优损失函数的Crossformer模型分别实现51.42%、51.04%和48.62%的收益率;相比之下,表现最好的PPO和DDPG方法同期最高收益率分别为41%、2.81%和41.58%。代码已公开。
原文摘要 · Abstract (English)
Stock trading has always been a challenging task due to the highly volatile nature of the stock market. Making sound trading decisions to generate profit is particularly difficult under such conditions. To address this, we propose four novel loss functions to drive decision-making for a portfolio of stocks. These functions account for the potential profits or losses based with respect to buying or shorting respective stocks, enabling potentially any artificial neural network to directly learn an effective trading strategy. Despite the high volatility in stock market fluctuations over time, training time-series models such as transformers on these loss functions resulted in trading strategies that generated significant profits on a portfolio of 50 different S&P 500 company stocks as compared to a benchmark reinforcment learning techniques and a baseline buy and hold method. As an example, using 2021, 2022 and 2023 as three test periods, the Crossformer model adapted with our best loss function was most consistent, resulting in returns of 51.42%, 51.04% and 48.62% respectively. In comparison, the best performing state-of-the-art reinforcement learning methods, PPO and DDPG, only delivered maximum profits of around 41%, 2.81% and 41.58% for the same periods. The code is available at https://anonymous.4open.science/r/bandit-stock-trading-58C8/README.md.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。