factor_agent#

LLM-driven, mechanism-first formulaic factor research on quantlab.

Modules

acceptance

Acceptance: the accepted factors' incremental test in the acceptance model, the one-time hold-out, and their export.

accepted

Accepted factors exported by Acceptance.export, one generated module each (GraphFactor subclasses).

aggregations

Session aggregations: the operators that reduce each session's intraday bars to one value per stock and day.

campaign

The Campaign: the research loop, from one config to accepted and rejected candidates.

candidate

A factor candidate as the proposer writes it: a stated mechanism and the KunQuant code.

cli

The factor-agent console script: factor-agent check <config> [--ping].

config

The campaign config: one YAML file holds every setting of a run.

derived

Derived columns: columns a daily factor's graph reads that its dataset does not hold.

evaluator

The Evaluator: the only module that reads data.

events

The events file: what a campaign is doing, appended as it happens, for anyone watching the run.

exported

Accepted factors as quantlab factors: a FactorKunQuant whose outputs are recorded graphs.

gate

The Gate: deterministic checks that every candidate passes before it is evaluated.

ledger

The trial ledger: one JSON line per candidate, accepted or not.

llm

period_lag

Period lags read from data: the lag columns PeriodLag(x, k) reads, computed when a factor is.

preflight

The report of Campaign.check: what a run would refuse before its first LLM call.

prompts

Prompt templates.

researcher

The Researcher: the LLM roles of a round, from prompt to checked candidates.

scoring

Scoring: how a factor's raw values become the values that are judged.

segments

Evaluation segments: the date ranges the campaign and the acceptance read, the purge and the hold-out lock.

session

Session columns: intraday graphs computed on intraday bars, one value per stock and session.

snapshot

The RunSnapshot: the files a run searched with and the code it ran, kept in its run directory.

web

The web frontend: a read-only view of the run directories under a folder, served on localhost.

zoo

The Zoo: the factors a candidate must not rewrite, as graphs the Gate compares it with.