Can Large Language Models Mine Interpretable Financial Factors More Effectively? A Neural-Symbolic Factor Mining Agent Model

Zhiwei Li, Ran Song, Caihong Sun, Wei Xu, Zhengtao Yu, Ji-Rong Wen

Abstract

The discovery of effective "factors"—mathematical formulas used to predict stock returns—is a cornerstone of quantitative finance. Traditional methods often face a trade-off between the interpretability of symbolic expressions and the predictive power of "black-box" neural networks. This paper introduces the FActor Mining Agent (FAMA), a neural-symbolic framework that utilizes Large Language Models (LLMs) to mine interpretable factors. By employing Cross-Sample Selection (CSS) to ensure diversity and a Chain-of-Experience (CoE) to guide iterative refinement, FAMA achieves superior performance on S&P 500 data, reaching a RankIC of 0.054 and an annualized return of 38.4% in simulations.

Introduction

In quantitative investment, factors are formulas applied to raw market data (e.g., price, volume) to forecast future returns. Historically, researchers have relied on two paradigms: Symbolic Models, such as Genetic Programming, which produce human-readable but hard-to-optimize formulas; and Neural Models, which offer high accuracy but lack financial intuition.

Comparison of Symbolic, Neuro, and Neuro-symbolic Factor Methods.

The FAMA framework bridges this gap by treating the LLM as a symbolic engine capable of reasoning about financial formulas while optimizing based on numerical performance feedback.

Methodology: The FActor Mining Agent (FAMA)

FAMA operates as an iterative agent that evolves simple factors into complex, high-performing ones. The system's effectiveness relies on two core innovations:

Cross-Sample Selection (CSS)

LLMs tend toward "homogeneity," often generating repetitive formulas when prompted with similar examples. CSS mitigates this by using K-Means clustering to categorize existing factors. It then selects representative samples from diverse clusters to serve as in-context examples, forcing the LLM to explore a broader mathematical space.

Chain-of-Experience (CoE)

Inspired by Chain-of-Thought prompting, CoE provides the LLM with a historical trajectory of factor improvement (e.g., Factor A -> Factor B -> Factor C). This "experiential prompt" allows the model to understand the logic behind successful factor evolution rather than just viewing a static list of results.

Detailed architecture of the FAMA framework, illustrating the interaction between CSS, CoE, and the LLM.

Experimental Setup

The model was tested using historical data for the S&P 500 index from 2015 to 2022. The mining process began with 38 initial factors from the Alpha101 set. The dataset was split into a training/validation period (2015–2021) and a test period (2021–2022).

Results

FAMA demonstrated significant improvements over both traditional Genetic Programming (GP) and state-of-the-art neural models like FactorVAE.

  • Predictive Accuracy: FAMA achieved a RankIC of 0.054, surpassing FactorVAE (0.048).
  • Consistency: The model reached a RankICIR of 0.485, indicating highly stable predictive power compared to FactorVAE’s 0.379.
  • Investment Performance: In backtesting simulations, FAMA-mined factors yielded an Annualized Return (AR) of 38.4%, significantly outperforming the S&P 500 index (26.3%) and FactorVAE (31.8%). Notably, it maintained a low volatility of 4.9%.

Discussion and Conclusion

The success of FAMA suggests that LLMs can effectively bridge the gap between symbolic reasoning and numerical optimization in finance. By using diversity-promoting selection (CSS) and evolutionary prompting (CoE), the agent avoids the pitfalls of "lazy" exploration common in standard LLM applications.

While FAMA shows great promise, challenges remain regarding the computational cost of iterative LLM calls and the potential for mathematical "hallucinations." Future work will focus on refining feedback loops and ensuring the robustness of generated formulas against data leakage.

Summary updated

BibTeX
@inproceedings{li2024can,
  author = {Zhiwei Li and Ran Song and Caihong Sun and Wei Xu and Zhengtao Yu and Ji-Rong Wen},
  title = {{Can Large Language Models Mine Interpretable Financial Factors More Effectively? A Neural-Symbolic Factor Mining Agent Model}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2024},
  doi = {10.18653/v1/2024.findings-acl.233},
}
Figure