How trademaster-ntu/finworld works
FinWorld is an end-to-end financial AI research platform. A typical workflow acquires market data, preprocesses it into task datasets, trains forecasting or trading/portfolio models, and evaluates their outputs. The repository also includes LLM agents for financial research and a vendored VERL stack for distributed LLM/RL training. README statements support the broad task flow and capabilities; source excerpts clarify selected agent, model, registry, logging, and VERL internals. Several implementation paths are unsampled, so links for those branches rely on the README rather than inspected call chains.
Main entry points: registry.py Component registry · models Financial models · async_multistep_agent.py Multistep agent runtime · trainer Task trainers
Components 24
Data pipeline
- Market downloaders
finworld/downloader - Data processors
finworld/processor - Task datasets
finworld/data - Component registry
finworld/registry.py
Models and tasks
- Time embeddings
finworld/models/embed/time.py - Financial models
finworld/models - Trading environments
finworld/environment - Forecasting tasks
finworld/trainer/time - Trading tasks
finworld/trainer - Portfolio tasks
finworld/trainer
Agents and tools
- Financial agents
finworld/agent/agent - Multistep agent runtime
finworld/base/async_multistep_agent.py - LLM providers
finworld/models/llm_provider/base.py - Deep research
finworld/tools/deep_researcher.py - Agent tools
finworld/tools/tools.py - Python execution
finworld/tools/executor/local_python_executor.py - Agent memory
finworld/memory/memory.py
Training and evaluation
- Evaluation metrics
finworld/evaluator - Reports and plots
finworld/plot - Task trainers
finworld/trainer - Distributed engines
libs/verl/verl/workers/engine - Training checkpoints
libs/verl/verl/utils/checkpoint/checkpoint_manager.py - Experiment logging
finworld/log/logger.py
Other components
- Researcher
Connections 29
- Researcher → Market downloaders: select data
README.md - Market downloaders → Data processors: acquire for
README.md - Data processors → Task datasets: prepare data
README.md - Task datasets → Task trainers: train from
README.md - Component registry → Market downloaders: registers
finworld/registry.py - Component registry → Data processors: registers
finworld/registry.py - Component registry → Task datasets: registers
finworld/registry.py - Component registry → Trading environments: registers
finworld/registry.py - Component registry → Financial models: registers
finworld/registry.py - Task datasets → Time embeddings: provides time data
README.md - Time embeddings → Financial models: embeds features
README.md - Financial models → Forecasting tasks: supports forecasting
README.md - Financial models → Trading tasks: supports trading
README.md - Financial models → Portfolio tasks: supports portfolios
README.md - Trading environments → Trading tasks: encapsulates task
README.md - Trading environments → Portfolio tasks: encapsulates task
README.md - Task trainers → Evaluation metrics: evaluates results
README.md - Evaluation metrics → Reports and plots: presents metrics
README.md - Researcher → Financial agents: request research
README.md - Financial agents → Multistep agent runtime: runs through
finworld/agent/agent/deep_researcher_agent/deep_researcher_agent.py - Multistep agent runtime → LLM providers: uses models
finworld/base/async_multistep_agent.py - Multistep agent runtime → Agent tools: invokes tools
finworld/base/async_multistep_agent.py - Multistep agent runtime → Agent memory: uses memory
finworld/base/async_multistep_agent.py - Deep research → LLM providers: queries model
finworld/tools/deep_researcher.py - Deep research → Agent tools: searches web
README.md - Agent tools → Python execution: dispatches code
- Task trainers → Distributed engines: distributed training
README.md - Distributed engines → Training checkpoints: saves state
libs/verl/verl/workers/engine/fsdp/engine_impl.py - Task trainers → Experiment logging: tracks runs
README.md