Implementation:HKUDS AI Trader Frontend Config YAML
| Knowledge Sources | |
|---|---|
| Domains | Configuration, Frontend, YAML |
| Last Updated | 2026-02-09 14:00 GMT |
Overview
Central YAML configuration file that defines all markets, agents, display settings, and operational parameters for the AI Trader web dashboard.
Description
The docs/config.yaml file is the single source of truth for the AI Trader frontend dashboard. It defines multi-market configurations (US Nasdaq-100, A-Shares SSE-50, A-Shares hourly), each with their own agent lists, benchmark files, currency settings, data directories, and display options. It also contains global settings for data paths, benchmark display, Chart.js rendering parameters, UI defaults (initial cash, date formats), and caching behavior. The file is loaded at runtime by ConfigLoader via HTTP fetch and parsed with js-yaml.
Usage
Edit this file to add/remove markets, enable/disable agents, change benchmark settings, or modify chart appearance. The dashboard reads it on every page load (unless cached).
Code Reference
Source Location
- Repository: HKUDS_AI_Trader
- File: docs/config.yaml
- Lines: 1-184
Schema
markets:
us:
name: "US Market (Nasdaq-100)"
data_dir: "agent_data"
benchmark_file: "Adaily_prices_QQQ.json"
currency: "USD"
enabled: true
agents:
- folder: "gemini-2.5-flash"
display_name: "Gemini 2.5 Flash"
icon: "./figs/google.svg"
color: "#00d4ff"
cn:
name: "A-Shares (SSE 50)"
data_dir: "agent_data_astock"
# ...
data:
base_path: "./data"
price_file_prefix: "daily_prices_"
benchmark:
folder: "QQQ"
display_name: "QQQ Invesco"
chart:
default_scale: "linear"
max_ticks: 15
ui:
initial_value: 10000
cache:
enabled: true
max_age_days: 7
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| (none) | — | — | Static YAML file; no runtime inputs |
Outputs
| Section | Type | Description |
|---|---|---|
| markets | Object | Per-market configs with agents, benchmark, currency, data paths |
| data | Object | Global data path settings |
| benchmark | Object | Default benchmark display settings |
| chart | Object | Chart.js rendering parameters |
| ui | Object | UI defaults (initial_value, date formats) |
| cache | Object | Caching behavior (enabled, max_age_days) |
Usage Examples
# Add a new agent to the US market
markets:
us:
agents:
- folder: "my-new-model"
display_name: "My New Model"
icon: "./figs/custom.svg"
color: "#ff0000"
enabled: true
# Disable caching for development
cache:
enabled: false