Table of Contents
Fetching ...

Alpha Discovery via Grammar-Guided Learning and Search

Han Yang, Dong Hao, Zhuohan Wang, Qi Shi, Xingtong Li

TL;DR

AlphaCFG addresses the challenge of discovering interpretable formulaic alphas by imposing a grammar-based structure on the search space, enforcing both syntactic and semantic validity. It reframes alpha discovery as a Tree-Structured Linguistic MDP and solves it with grammar-aware Monte Carlo Tree Search guided by Tree-LSTM encoders for policy and value estimation. Empirical results on CSI 300 and S&P 500 demonstrate superior IC, Sharpe, and downside controls versus strong baselines, with ablations underscoring the necessity of grammar constraints and syntax-aware learning. The framework further supports factor refinement and generalizes to other quantitative-finance tasks, presenting a principled approach to grammar-guided symbolic regression in finance.

Abstract

Automatically discovering formulaic alpha factors is a central problem in quantitative finance. Existing methods often ignore syntactic and semantic constraints, relying on exhaustive search over unstructured and unbounded spaces. We present AlphaCFG, a grammar-based framework for defining and discovering alpha factors that are syntactically valid, financially interpretable, and computationally efficient. AlphaCFG uses an alpha-oriented context-free grammar to define a tree-structured, size-controlled search space, and formulates alpha discovery as a tree-structured linguistic Markov decision process, which is then solved using a grammar-aware Monte Carlo Tree Search guided by syntax-sensitive value and policy networks. Experiments on Chinese and U.S. stock market datasets show that AlphaCFG outperforms state-of-the-art baselines in both search efficiency and trading profitability. Beyond trading strategies, AlphaCFG serves as a general framework for symbolic factor discovery and refinement across quantitative finance, including asset pricing and portfolio construction.

Alpha Discovery via Grammar-Guided Learning and Search

TL;DR

AlphaCFG addresses the challenge of discovering interpretable formulaic alphas by imposing a grammar-based structure on the search space, enforcing both syntactic and semantic validity. It reframes alpha discovery as a Tree-Structured Linguistic MDP and solves it with grammar-aware Monte Carlo Tree Search guided by Tree-LSTM encoders for policy and value estimation. Empirical results on CSI 300 and S&P 500 demonstrate superior IC, Sharpe, and downside controls versus strong baselines, with ablations underscoring the necessity of grammar constraints and syntax-aware learning. The framework further supports factor refinement and generalizes to other quantitative-finance tasks, presenting a principled approach to grammar-guided symbolic regression in finance.

Abstract

Automatically discovering formulaic alpha factors is a central problem in quantitative finance. Existing methods often ignore syntactic and semantic constraints, relying on exhaustive search over unstructured and unbounded spaces. We present AlphaCFG, a grammar-based framework for defining and discovering alpha factors that are syntactically valid, financially interpretable, and computationally efficient. AlphaCFG uses an alpha-oriented context-free grammar to define a tree-structured, size-controlled search space, and formulates alpha discovery as a tree-structured linguistic Markov decision process, which is then solved using a grammar-aware Monte Carlo Tree Search guided by syntax-sensitive value and policy networks. Experiments on Chinese and U.S. stock market datasets show that AlphaCFG outperforms state-of-the-art baselines in both search efficiency and trading profitability. Beyond trading strategies, AlphaCFG serves as a general framework for symbolic factor discovery and refinement across quantitative finance, including asset pricing and portfolio construction.
Paper Structure (48 sections, 21 equations, 10 figures, 9 tables, 4 algorithms)

This paper contains 48 sections, 21 equations, 10 figures, 9 tables, 4 algorithms.

Figures (10)

  • Figure 1: Nested spaces of alpha expressions: $\Sigma^*$ (all symbol sequences), $\mathcal{L}_{\mathrm{syn}}$ (syntactically valid), $\mathcal{L}_{\mathrm{sem}}$ (semantically valid), and $\mathcal{L}_{\mathrm{sem}}^{\le K}$ (length-bounded semantic alphas).
  • Figure 2: The tree-structured search space.
  • Figure 3: Grammar-aware reinforcement learning and MCTS, based on alpha representation and value and policy networks.
  • Figure 4: Comparison of training curves of generation methods.
  • Figure 5: Cumulative return comparison in simulated trading
  • ...and 5 more figures

Theorems & Definitions (6)

  • Definition 1
  • Definition 2: $\alpha$-Syn
  • Definition 3: $\alpha$-Sem
  • Definition 4: Search Space Structure
  • Definition 5: TSL-MDP
  • Definition 6: Isomorphism of ASR(Tree)