Files
MoFin/specs/evaluation.json

49 lines
2.1 KiB
JSON
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{
"module": "evaluation",
"version": "1.0",
"purpose": "策略评估系统。提供策略双维度评估结果查询、手动触发评估和准确率统计。",
"human_help": {
"title": "策略评估",
"description": [
"评估每只股票策略的有效性,来自 strategy_evaluator.py(每周六 21:00 自动运行)。",
"支持手动触发评估(POST /api/evaluation/trigger)。",
"评估数据主源为 evaluation.json,备选为 decisions.json 中的 evaluation 字段。"
],
"usage": [
"GET /api/evaluation — 获取全部策略评估结果",
"POST /api/evaluation/trigger — 手动触发策略评估(执行 strategy_evaluator.py",
"GET /api/stats/accuracy — 获取准确率统计数据",
"GET /api/feedback — 获取策略反馈数据"
],
"troubleshooting": [
"评估数据为空 → 确认 strategy_evaluator.py 已运行过",
"触发失败 → 检查 strategy_evaluator.py 路径是否正确"
]
},
"ai_spec": {
"apis": [
{"method": "GET", "path": "/api/evaluation", "returns": "[{code, name, type, current, evaluations[{date, dimension, score, reason}]}]"},
{"method": "POST", "path": "/api/evaluation/trigger", "returns": "{status:'ok', output, error} — 执行 strategy_evaluator.pytimeout 60s"},
{"method": "GET", "path": "/api/stats/accuracy", "returns": "accuracy_stats.json 内容"},
{"method": "GET", "path": "/api/feedback", "returns": "strategy_feedback.json 内容"}
],
"dependencies": [
"strategy_evaluator.py — 双维度评估脚本(cron: 周六 21:00",
"evaluation.json — 评估结果主数据源",
"accuracy_stats.json — 准确率统计",
"strategy_feedback.json — 反馈数据"
],
"constraints": [
"POST /api/evaluation/trigger 会阻塞最多 60 秒",
"评估数据优先读 evaluation.jsonfallback 读 decisions.json 的 evaluation 字段"
],
"related_files": [
"server.py — /api/evaluation, /api/evaluation/trigger, /api/stats/accuracy, /api/feedback",
"strategy_evaluator.py",
"strategy_feedback.py"
]
}
}