投资组合优化是量化交易系统的重要组成部分,目的是选择投资组合中的最佳资产分布,以在给定风险水平下达到最大化回报或满足预期收益的情况下最小化风险。该理论由 Markowitz (1952) 首创,被广泛称为现代投资组合理论。构建这样一个投资组合的主要好处来自促进多元化,使股票曲线平滑,从而导致比交易单个资产更高的单位风险回报。在股票量化投资与深度学习领域进行组合优化的过程通常是在算法预测了个股收益或评分之后再单独进行投资组合优化,这导致每个阶段的目标函数不同,可能会对最终的决策产生负面影响。为了解决这个问题,本文通过比较不同的网络架构,展示了端到端深度学习投资组合优化的可行性。在本研究中,我们基于BiLSTM和注意力机制建立了一个前置神经网络,并通过将五种不同的组合优化方式嵌入到网络中进行实现和比较。为每个模型设计了合适的损失函数和训练过程。这些模型包括:(1)Softmax直接用于资产分配,(2)采用均值方差优化(MVO)的两阶段法,(3)端到端MVO,(4)端到端风险预算优化,(5)与聚类相结合的端到端MVO。我们在中证多个指数的实证研究表明,端到端组合优化神经网络在各种市场情景中均优于两步法、直接权重预测方法和平均分配权重法,从而证明了深度学习投资组合优化的端到端实现的可行性。本文构建了不同的投资组合优化神经网络层并将其嵌入神经网络,得到一种可行的端到端组合优化神经网络结构。进一步又提出了生成模型产生虚拟数据,通过输入随机数去不断模拟未来市场中的各种情境,并设计训练和微调模式将其应用在日频换仓的股票策略中。结合生成模型和端到端投资组合优化框架,对风险进行校准,以提高策略的性能。在中证指数中实证得出,端到端组合优化神经网络经过生成模型风险校准后收益有着明显增厚。
Portfolio optimization is a crucial component of quantitative trading systems, aiming to select the optimal asset allocation within a portfolio to either maximize returns given a certain level of risk or minimize risk while meeting expected returns. This theory was first introduced by Markowitz (1952) and is widely known as Modern Portfolio Theory. The main benefit of constructing such a portfolio stems from promoting diversification, smoothing equity curves, and consequently resulting in higher risk-adjusted returns compared to trading individual assets. In the realm of stock quantitative investment and deep learning, the conventional approach is to perform portfolio optimization separately after an algorithm has predicted individual stock returns or ratings. This leads to different objective functions at each stage and may negatively impact final decisions. To address this issue, this study demonstrates the feasibility of end-to-end deep learning portfolio optimization by comparing different network architectures. In this research, we establish a front-end neural network based on BiLSTM and attention mechanisms and implement and compare five different optimization methods embedded within the network. Suitable loss functions and training processes are designed for each model, which include: (1) Softmax directly applied to asset allocation, (2) two-step Mean-Variance Optimization (MVO), (3) end-to-end MVO, (4) end-to-end risk budgeting optimization, and (5) end-to-end MVO combined with clustering. Our empirical research on multiple CSI indices reveals that end-to-end portfolio optimization neural networks outperform two-step methods, direct weight prediction approaches, and equal weight allocation across various market scenarios, thereby proving the feasibility of end-to-end implementation for deep learning portfolio optimization.This study constructs various portfolio optimization neural network layers, embedding them into the neural network to develop a viable end-to-end portfolio optimization neural network structure. Additionally, we propose generating virtual data using generative models, simulating various scenarios in future markets by inputting random numbers, and designing training and fine-tuning modes for application in daily-rebalanced stock strategies. By integrating generative models and the end-to-end portfolio optimization framework, risk calibration is conducted to enhance strategy performance. Empirical evidence from the CSI indices shows that the returns of end-to-end portfolio optimization neural networks with risk calibration from generative models are significantly improved.