Neural network-based automatic factor construction

Jie Fang, Jianwu Lin, Shu‐Tao Xia, Zhikang Xia, Shenglei Hu, Xiang Liu, Yong JiangQuantitative 2020 · DOI

Abstract

Quantitative finance relies heavily on "alpha factors" to predict stock returns. Traditional methods like manual construction or Genetic Programming (GP) face limitations in efficiency and diversity. This paper introduces NNAFC, a neural network framework that automates factor discovery by maximizing a differentiable version of the Rank Information Coefficient. By integrating prior financial knowledge and utilizing gradient descent, NNAFC generates factors that significantly outperform traditional benchmarks in both predictive power and portfolio returns.

Introduction

The discovery of predictive signals, or factors, is central to quantitative investment. While manual derivation by experts has been the gold standard, the increasing complexity and dimensionality of financial data necessitate automated approaches. Genetic Programming (GP) has been a popular alternative but often suffers from search inefficiency and the production of highly correlated "factor zoos." This research proposes a shift toward deep learning-based evolution, treating factor discovery as a continuous optimization problem.

The NNAFC Framework

The Neural Network-based Automatic Factor Construction (NNAFC) framework reimagines factor discovery through the lens of neural architecture and gradient-based optimization.

The NNAFC framework architecture, illustrating the flow from raw data to feature extraction and backpropagation based on correlation.

Differentiable Rank IC

A key challenge in training neural networks for factor construction is the non-differentiability of the Rank Information Coefficient (Rank IC), the standard metric for factor quality. The rank() function is a step function with zero gradients, preventing standard backpropagation. NNAFC addresses this by introducing a derivable kernel function—a sigmoid-based approximation—that maps data into a normal distribution. This allows the network to optimize ranking performance directly via gradient descent.

Approximation of the rank function using a sigmoid-based kernel to enable differentiability for gradient descent across different Gaussian distributions.

Prior Knowledge and Pruning

To ensure financial relevance and avoid overfitting to noise, the framework incorporates "Prior Knowledge" (PK). Networks are pre-trained to replicate established technical indicators (e.g., MACD, RSI) through a process termed "model stealing." Weight pruning is then applied to retain the core logic of these indicators while allowing the network to evolve more complex, non-linear variations.

Experimental Results

The researchers evaluated NNAFC using Chinese A-share stock market data from 2009 to 2020, targeting the prediction of cross-sectional relative returns over a 5-day horizon.

Predictive Performance and Diversity

NNAFC factors demonstrated superior predictive power compared to GP, with Information Coefficients (IC) ranging from 0.107 to 0.124, versus 0.094 for GP. Furthermore, NNAFC produced a more diverse set of factors, as measured by cross-entropy distance, mitigating the "factor zoo" problem common in automated discovery. Interestingly, LSTMs and FCNs outperformed CNNs, suggesting temporal sequences are more informative than spatial cross-stock patterns in this context.

Portfolio Backtesting

In backtesting scenarios, a multi-factor strategy utilizing LSTM-based NNAFC factors achieved a Sharpe Ratio of 3.289. This significantly outperformed both human-expert baselines (2.314) and GP-constructed factors (1.435), highlighting the practical utility of the framework in live trading environments.

Conclusion

NNAFC represents a significant advancement in automated factor construction. By making the rank-based objective function differentiable and leveraging neural networks' capacity for non-linear feature extraction, the framework provides a robust, scalable alternative to Genetic Programming. Future work will explore the application of this evolutionary neural approach to fundamental and unstructured data sources.

Summary updated

BibTeX
@misc{fang2020neural,
  author = {Jie Fang and Jianwu Lin and Shu‐Tao Xia and Zhikang Xia and Shenglei Hu and Xiang Liu and Yong Jiang},
  title = {{Neural network-based automatic factor construction}},
  year = {2020},
  eprint = {2008.06225},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2008.06225},
}
Figure