FactorEngine: A Knowledge‑Infused Framework for Quantitative Alpha Factor Discovery
The paper introduces FactorEngine, a program‑level factor mining system that injects domain knowledge from financial reports via LLM‑guided pipelines, separates logic correction, parameter optimization, and LLM usage, and demonstrates superior information‑ratio, Sharpe, and annualized returns over GP, neural, and other agent‑based baselines on CSI300 and CSI500 markets.
Background
Alpha factor mining aims to extract predictive signals from noisy, non‑stationary market data. Traditional symbolic methods offer interpretability but require extensive manual rules and struggle with market regime shifts, while neural predictors improve performance at the cost of explainability and robustness. Recent large language models (LLMs) have sparked interest in enhancing factor discovery, yet existing approaches still suffer from limited expression power, factor diversity, and inefficient evolution pipelines.
Problem Definition
Given a stock pool S = {s_1, …, s_N} observed over T = {t_1, …, t_T} trading days, each stock s_i at day t provides an M -dimensional feature vector. Let X_{t‑L+1:t} denote the raw market features in a look‑back window of length L. The goal is to learn an alpha factor f that maps historical features to an l -step‑ahead prediction r_{t+l}. A set of K factors is aggregated by a function g (e.g., linear regression or a neural network) to produce a composite signal Z. The ultimate objective is to maximize a performance metric R(Z, Y) (e.g., information coefficient, IC) over the entire horizon, where Y denotes the realized future returns.
Method
Bootstrapping Module
The bootstrapping module converts unstructured financial reports and expert‑designed factors into executable Python code. It consists of three sub‑steps:
PDF Processing: An LLM‑based compliance filter retains valid reports and merges their domain knowledge with the model’s internal knowledge base.
Factor Extraction: A two‑stage workflow iteratively reflects on and validates report content, producing a structured JSON representation and LaTeX‑style pseudo‑code.
Code Generation: The validated pseudo‑code is refined into executable Python, ensuring syntactic correctness and adherence to predefined interfaces (input types, output format, allowed libraries).
All successfully extracted factors and their underlying economic rationales populate an initial knowledge‑injected factor pool, serving as the seed population for evolution.
Evolution Module
The evolution module is the core of FactorEngine, employing a macro‑micro co‑evolution mechanism inspired by OpenEvolve. It separates logical evolution from parameter optimization:
Program Selection: Factors are organized in a tree where each node represents an evolved program. Node value Q(v) aggregates the average reward of its subtree. Selection uses a UCT (Upper Confidence bound applied to Trees) score: UCT(v) = Q(v) + c \sqrt{\frac{\ln N_{parent(v)}}{N(v)}}, with c = \sqrt{2}, balancing exploration and exploitation.
Idea Generation: Prompted LLM agents synthesize high‑level inspirations and structural modifications based on the current program and its evolutionary history. Candidate paths are scored by coverage S_{cov}, effectiveness S_{eff}, and total score S_{total}, then fed back to the LLM as explicit experience.
Implementation: Micro‑level mutations are performed via Bayesian hyper‑parameter search (TPE, GP, etc.) to optimize parameters \theta of a program P. The evaluation function f(P, \theta) returns a composite performance score; Bayesian optimization maximizes expected improvement, using a performance threshold y^* (top 25% of observed scores) to guide exploration.
Feedback Propagation: After execution, the LLM summarizes the program’s logic changes and performance delta, storing this structured feedback in the node. Quantitative feedback propagates up the tree, updating Q and N values. Multi‑island evolution runs N independent islands; every M rounds the top‑3 programs migrate to other islands, enabling cross‑trajectory knowledge reuse.
Integration Module
The integration module selects elite nodes and builds a multi‑factor model. Each candidate factor receives a fitness score FS = w_1 \cdot IC + w_2 \cdot ICIR that captures both magnitude and stability. Under a rolling window L = 2, only factors with FS > 0.4 are retained (up to 5 per island), and the top‑10 parameter configurations per factor are further evaluated.
Experiments
Experimental Setup
Baselines include GPlearn (genetic programming), traditional time‑series neural models (LightGBM, LSTM, Transformer), the professional TRA model, and agent‑based methods AlphaAgent and RD‑Agent. A handcrafted factor set Alpha‑158 serves as an additional baseline. All methods use the Gemini‑2.5‑Pro backbone for fair comparison. Experiments run on the full‑market Qlib dataset, with training (2008‑01‑01 – 2014‑12‑31), validation (2015‑01‑01 – 2016‑12‑31), and test (2017‑01‑01 – 2024‑12‑31) periods. OHLCV features constitute the raw inputs; financial reports released before 2017 are used for knowledge injection to avoid leakage. Two budget settings (200 and 400 evolution iterations) start from 5 or 10 seed factors.
Main Results
On CSI300, FE‑report achieves the highest IC (0.0474) and excess annualized return (18.99%). On CSI500, it reaches IC 0.0536 and AR 8.36%. Across iteration counts, FE consistently outperforms all baselines in IC, ICIR, AR, and Sharpe ratio. Increasing the amount of report‑derived knowledge further improves performance (IC from 0.0333 to 0.0474, AR from 0.1017 to 0.1899, MDD reduced from 15.57% to 12.61%).
Factor Diversity Analysis
Multi‑dimensional scaling of the correlation matrix (distance = 1 – |ρ|) shows that after filtering factors with IC < 0.015, FE‑alpha retains 36 effective factors (57.1% retention), far surpassing AlphaAgent and RD‑Agent. The resulting embedding exhibits a circular, dispersed pattern, indicating low redundancy; this aligns with a higher RoG (radius of gyration) metric.
Alpha Decay Analysis
All methods experience some decay over time, but FE‑report maintains stable or improving IC after 2021, while FE‑alpha shows a smooth decay curve, leading to superior cumulative returns. Larger look‑back windows increase correlation uniformly, yet FE‑evolved factors retain higher average correlation with future returns than baselines.
Token Efficiency and Executability
Running 200 iterations, FE’s computational overhead matches AlphaAgent but consumes fewer resources than RD‑Agent. FE benefits from the Polars data‑frame for accelerated computation and parallel factor evaluation, resulting in the lowest rate of non‑executable factors.
Ablation Studies
Bayesian vs. Non‑Bayesian Micro‑Search: With a fixed macro budget of 40 iterations, Bayesian search yields a best‑program score of ~0.38 versus ~0.25 without Bayes, accelerating convergence and improving final factor quality.
Backbone Ablation: Experiments with Gemini‑2.5‑Flash‑Lite and GPT‑4o show that GPT‑4o‑generated factors achieve the best ranking‑IC, ICIR, AR, IR, and SR on CSI300, confirming the importance of a strong LLM.
Configuration Ablation: Multi‑island evolution and CoE‑enhanced prompts consistently produce higher ranking‑IC and AR compared to a single‑island setup, demonstrating the benefit of diversified evolutionary trajectories and experience‑aware prompting.
Overall, FactorEngine proves that program‑level factor evolution, guided by LLM‑infused knowledge injection and Bayesian micro‑optimization, can discover more stable, diverse, and high‑performing alpha factors than existing symbolic, neural, or agent‑based approaches.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
