INNER CODE UNIT · Python
_catalog
simonlin1212/Vibe-Research · backtest/cli.py:47
def _catalog() -> dict:
"""界面要用的选项表 —— **由这里下发,前端不写死一份**。
写死的那份迟早与真实实现对不上,而对不上的表现是「选了没反应」或者
「真实存在的选项不在列表里」,两种都看不出是配置漂移。
"""
from backtest.gate import MARKETS, STYLES
return {
# The model assembles this JSON; option labels alone do not tell it that
# a ticker must be passed as codes: ["AAPL"], not symbol/ticker/code.
"input_schema": {
"type": "object", "additionalProperties": False,
"required": ["codes", "start", "end"],
"properties": {
"codes": {"type": "array", "minItems": 1, "items": {"type": "string"},
"description": "标的代码数组,例如 AAPL、600519.SH、00700.HK。字段必须叫 codes,不是 symbol。"},
"start": {"type": "string", "format": "date", "description": "起始日期 YYYY-MM-DD"},
"end": {"type": "string", "format": "date", "description": "结束日期 YYYY-MM-DD"},