Machine Learning Enhanced Multi-Factor Quantitative Trading: A Cross-Sectional Portfolio Optimization Approach with Bias Correction
Yimin Du · 2025
Read Machine Learning Enhanced Multi-Factor Quantitative Trading: A Cross-Sectional Portfolio Optimization Approach with Bias Correction by Yimin Du (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2507-07107.txt.
Introduction
Yimin Du builds a trading system for Chinese stocks in this two thousand twenty-five paper. He starts by naming a bug. A-share markets cap daily price moves, so some closing prices could never be traded. Pipelines take those prices in before filtering, poisoning moving averages, correlations, and ranks. Du calls this contamination. It swelled predictive power while cutting realized performance, as the model learned to call returns that can not be traded.
The fix is a mask-first design: a tradability mask is built at data load and threaded through all sums. On that base sit a GPU-vectorized engine computing two hundred-plus factors, a loss function punishing wrong-sign predictions eleven times harder than size errors, bootstrap-based augmentation, and optimized construction. Tests that drop one part showed the mask gave more than a model or loss choice. The build is released under an MIT license.
Catalog record
| CREATOR | Yimin Du |
|---|---|
| YEAR | 2025 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 45 KB |
| VERSION | 1.0 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2507-07107
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
Machine Learning Enhanced Multi-Factor Quantitative Trading: A Cross-Sectional Portfolio Optimization Approach with Bias Correction Yimin Du Abstract This paper presents a comprehensive machine learning framework for quantitative trading that achieves superior risk-adjusted returns through systematic factor engineering, real-time computation optimization, and cross-sectional portfolio construction. Our approach integrates multi-factor alpha discovery with bias correction techniques, leveraging PyTorch-accelerated factor computation and advanced portfolio optimization. The system processes 500-1000 factors derived from open-source alpha101 extensions and proprietary market microstructure signals. Key innovations include tensor-based factor computation acceleration, geometric Brownian motion data augmentation, and cross-sectional neutralization strategies. Empirical validation on Chinese A-share markets (2010-2024) demonstrates annualized returns of 20% with Sharpe ratios exceeding 2.0, significantly outperforming traditional approaches. Our analysis reveals the critical importance of bias correction in factor construction and the substantial impact of cross-sectional portfolio optimization on strategy performance. 1 1 1 Code and experimental implementations are available at: https://github.com/initial-d/ml-quant-trading I Introduction The quantitative finance landscape has undergone significant transformation, driven by advances in machine learning, computational acceleration, and sophisticated portfolio optimization techniques. Modern quantitative trading systems have evolved beyond traditional statistical arbitrage, incorporating deep learning architectures, real-time factor computation, and advanced bias correction methods. This evolution reflects the increasing complexity of financial markets and the need for robust, scalable trading frameworks. Recent developments in factor investing have moved beyond traditional Fama-French factors to explore hundreds of potential alpha sources derived from market microstructure and alternative data streams. However, the computational demands of processing large factor universes in real-time have created significant bottlenecks, while systematic biases in factor construction often compromise strategy performance through unintended risk exposures. The emergence of GPU-accelerated computation and tensor-based operations has enabled order-of-magnitude improvements in factor processing speed, making real-time computation of complex factor universes feasible. Simultaneously, advances in bias correction techniques, particularly cross-sectional neutralization methods, have addressed the challenge of factor crowding and systematic risk exposures that plague traditional approaches. Cross-sectional portfolio optimization has gained prominence over traditional time-series methods, focusing on relative performance within investment universes rather than absolute return prediction. This paradigm shift naturally hedges market risk while concentrating on security selection alpha, leading to more stable risk-adjusted returns. This paper presents a comprehensive machine learning framework that systematically integrates these technological advances through: (1) a systematic factor engineering pipeline incorporating state-of-the-art bias correction and stability assessment; (2) a PyTorch-based computational acceleration framework achieving substantial speedup through tensor-based operations; (3) comprehensive comparison across multiple model architectures including gradient boosting, deep neural networks, and transformer models; (4) novel application of geometric Brownian motion data augmentation for financial time series; and (5) rigorous cross-sectional portfolio optimization incorporating transaction costs and multiple constraint types. Our empirical validation on Chinese A-share markets demonstrates the framework’s effectiveness, achieving annualized returns of approximately 20% with Sharpe ratios exceeding 2.0 during 2021-2024, using models trained exclusively on 2010-2020 data. The framework’s modular architecture enables systematic analysis of individual component contributions, revealing the critical importance of bias correction and cross-sectional optimization in strategy performance. II Related Work II-A Factor Models and Engineering Factor-based investing traces its foundations to the Capital Asset Pricing Model (CAPM) [ 1 ] and Arbitrage Pricing Theory (APT) [ 2 ] , establishing the mathematical framework for multi-factor return decomposition. The Fama-French three-factor and five-factor models introduced size, value, profitability, and investment factors that became cornerstones of modern portfolio theory. The Alpha101 factor library represents a systematic approach to factor construction, providing 101 mathematically defined factors spanning momentum, reversal, volatility, and cross-sectional patterns. However, recent research has revealed significant limitations including high correlation structures, regime instability, and systematic biases that compromise out-of-sample performance. Green, Hand, and Zhang’s comprehensive analysis of 330+ anomalies demonstrated the critical importance of robust factor evaluation methodologies, highlighting how publication bias and data mining concerns affect factor reliability. Their work established rigorous standards for factor validation that influence contemporary systematic factor construction. II-B Machine Learning in Financial Markets Tree-based models, particularly gradient boosting machines, have shown exceptional performance in financial applications. Chen and Guestrin’s XGBoost algorithm [ 3 ] provided superior predictive performance and interpretability through feature importance analysis. Subsequent developments including LightGBM [ 4 ] further refined these approaches with improvements in categorical variable handling and overfitting reduction. The transformer architecture [ 5 ] , originally developed for natural language processing, has found success in financial time series modeling. Self-attention mechanisms effectively capture complex temporal dependencies in factor effectiveness, leading to superior return prediction accuracy compared to traditional approaches. Deep learning applications have progressed from simple feedforward networks to sophisticated architectures incorporating attention mechanisms and recurrent structures. Recent work demonstrates how these architectures can capture long-range dependencies in market data previously inaccessible to conventional time series models. II-C Computational Acceleration and Bias Correction The computational demands of modern quantitative systems have driven innovations in parallel processing and hardware acceleration. The transition from CPU-based pandas operations to GPU-accelerated tensor computations enables real-time processing of large-scale factor universes. Systematic biases in factor construction have emerged as critical concerns in quantitative finance. Traditional approaches often embed unintended exposures to market capitalization, industry membership, and other systematic risk factors. Industry and size neutralization techniques have evolved from simple cross-sectional regression to sophisticated machine learning-based methods that balance bias removal with signal preservation. Recent work by Harvey, Liu, and Zhu demonstrates how traditional neutralization methods can be enhanced through regularization techniques, while dynamic neutralization approaches adapt neutralization strength based on market regime characteristics. II-D Portfolio Optimization Modern portfolio optimization has evolved beyond the mean-variance framework to incorporate transaction costs, market impact functions, and complex constraint structures. Cross-sectional portfolio optimization represents a paradigm shift from traditional time-series approaches, focusing on relative performance within investment universes rather than absolute return prediction. Risk parity and volatility targeting strategies have gained prominence as alternatives to traditional mean-variance optimization. Multi-objective optimization frameworks handle competing objectives through Pareto-optimal solutions, explicitly balancing return maximization, risk minimization, and transaction cost control. Recent advances in quadratic programming solvers and constraint formulation techniques enable efficient solution of large-scale portfolio optimization problems with complex constraint structures, making sophisticated portfolio construction feasible in real-time trading environments. III Methodology Our methodology encompasses a comprehensive machine learning framework designed to address the fundamental challenges in quantitative trading: factor stability, computational efficiency, model robustness, and portfolio optimization. This section details the core algorithmic innovations and design considerations that enable superior risk-adjusted performance in dynamic market environments. III-A Factor Engineering and Discovery Pipeline III-A 1 Multi-Source Factor Construction The factor engineering pipeline begins with systematic construction of a comprehensive factor universe spanning multiple signal categories. Our approach extends the established Alpha101 foundation through principled factor family expansion and custom signal development. The Alpha101 factors provide a mathematically rigorous foundation covering momentum, reversal, volatility, and cross-sectional ranking patterns. Each factor undergoes careful implementation with attention to numerical stability and edge case handling: \alpha_{i,t}=\text{rank}\left(\frac{\text{close}_{i,t}-\text{close}_{i,t-d}}{\text{close}_{i,t-d}}\right)\times\text{rank}(\text{volume}_{i,t}) (1) where rank operations are computed cross-sectionally across the investment universe at each time point t . Beyond Alpha101, we develop proprietary market microstructure factors that capture systematic patterns in large-cap distribution dynamics. These factors recognize that individual security performance often reflects broader market regime characteristics: \beta_{market,i,t}=\frac{\text{cov}(r_{i,t-w:t},r_{market,t-w:t})}{\text{var}(r_{market,t-w:t})} (2) where w represents the estimation window and r_{market,t} denotes market-wide return patterns derived from large-cap index constituents. III-A 2 Factor Quality Assessment Framework Factor