How rndmvariableq/alphaagent works
AlphaAgent is a China A-share multi-factor research framework. Its main workflow fetches market and fundamental caches, builds a panel offline, evaluates DSL factor expressions, and stores/evaluates factors in FactorZoo. Optional mining sessions evaluate proposed expressions on train/validation splits. The graph preserves documented data, factor, and mining capabilities; several subsystem links use README evidence because the corresponding implementation was not sampled.
Main entry points: ingest.py Factor Ingestion · eval.py Factor Evaluation · panel.py Panel Store · market_fetch.py Market Fetch
Components 28
Market Data
- Market Fetch
alphaagent/data/market_fetch.py - Fundamental Fetch
alphaagent/data/fundamental_fetch.py - Industry Data
alphaagent/data/industry.py - Universe
alphaagent/data/universe.py - Tushare Client
alphaagent/data/tushare_client.py - Raw Caches
alphaagent/core/paths.py - Panel Builder
alphaagent/data/panel.py - Panel Store
alphaagent/data/panel.py
Factor DSL
- DSL Parser
alphaagent/dsl/core/parser.py - DSL Operators
alphaagent/dsl/core/operators.py - Evaluation Kernels
alphaagent/dsl/core/accel.py - Chip Operators
alphaagent/dsl/core/chip_daily.py - Stock Timeframes
alphaagent/dsl/stock/resample.py - Expression Evaluator
alphaagent/dsl/eval.py
Factor Research
- Factor Evaluation
alphaagent/factor/eval.py - Evaluation Metrics
alphaagent/factor/metrics.py - Factor Ingestion
alphaagent/factor/ingest.py - Canonical Row Index
alphaagent/factor/zoo/index.py - FactorZoo Library
alphaagent/factor/zoo/zoo.py - Factor Similarity
alphaagent/factor/zoo/similarity.py - Research Reports
alphaagent/factor/report.py
Factor Mining
- Mining Evaluation Service
alphaagent/factor/mining/service.py - Mining Sessions
alphaagent/factor/mining/session.py - Train-Val Context
alphaagent/factor/mining/context.py - Mining Agents
alphaagent/factor/mining/agentscope_run.py
Other components
- Researcher
- Tushare Pro
- LLM Provider
Connections 37
- Researcher → Market Fetch: requests data
README.md - Researcher → Fundamental Fetch: requests data
README.md - Market Fetch → Tushare Client: calls API
alphaagent/data/market_fetch.py - Fundamental Fetch → Tushare Client: calls API
alphaagent/data/fundamental_fetch.py - Industry Data → Tushare Client: calls API
alphaagent/data/industry.py - Tushare Client → Tushare Pro: retrieves data
alphaagent/data/tushare_client.py - Market Fetch → Universe: selects pool
alphaagent/data/market_fetch.py - Market Fetch → Raw Caches: writes cache
README.md - Fundamental Fetch → Raw Caches: writes cache
README.md - Industry Data → Raw Caches: writes cache
README.md - Researcher → Panel Builder: builds panel
README.md - Panel Builder → Raw Caches: reads caches
alphaagent/data/panel.py - Panel Builder → Universe: filters universe
alphaagent/data/panel.py - Panel Builder → Panel Store: persists panel
alphaagent/data/panel.py - Researcher → Factor Evaluation: evaluates factor
README.md - Factor Evaluation → Panel Store: loads panel
alphaagent/factor/eval.py - Factor Evaluation → Expression Evaluator: evaluates expression
alphaagent/factor/eval.py - Expression Evaluator → DSL Parser: compiles expression
alphaagent/dsl/eval.py - DSL Operators → Evaluation Kernels: uses kernels
alphaagent/dsl/core/operators.py - DSL Operators → Chip Operators: uses operators
alphaagent/dsl/core/operators.py - Expression Evaluator → Stock Timeframes: handles timeframes
alphaagent/dsl/eval.py - Factor Evaluation → Evaluation Metrics: computes metrics
alphaagent/factor/eval.py - Researcher → Factor Ingestion: ingests expressions
README.md - Factor Ingestion → Panel Store: loads panel
alphaagent/factor/ingest.py - Factor Ingestion → Expression Evaluator: materializes expression
alphaagent/factor/ingest.py - Factor Ingestion → Canonical Row Index: aligns rows
alphaagent/factor/ingest.py - Canonical Row Index → Panel Store: indexes rows
alphaagent/factor/zoo/index.py - Factor Ingestion → FactorZoo Library: stores factors
README.md - Factor Ingestion → Factor Similarity: checks similarity
alphaagent/factor/ingest.py - Researcher → Research Reports: requests reports
README.md - Researcher → Mining Agents: starts mining
README.md - Mining Agents → LLM Provider: proposes factors
README.md - Mining Agents → Mining Evaluation Service: requests evaluation
- Mining Evaluation Service → Mining Sessions: creates session
alphaagent/factor/mining/service.py - Mining Sessions → Train-Val Context: uses context
alphaagent/factor/mining/session.py - Mining Evaluation Service → Factor Evaluation: evaluates splits
alphaagent/factor/mining/service.py - Mining Sessions → Panel Store: loads panel
alphaagent/factor/mining/session.py