feat: Add evaluation hooks, skill adaptation and team pipeline config

- Add EvaluationHook for post-execution agent evaluation
- Add SkillAdaptationHook for dynamic skill adaptation
- Add team/ directory with team coordination logic
- Add TEAM_PIPELINE.yaml for smoke_fullstack pipeline config
- Update RuntimeView, TraderView and RuntimeSettingsPanel UI
- Add runtimeApi and websocket services
- Add runtime_state.json to smoke_fullstack state

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-19 18:52:12 +08:00
parent f4a2b7f3af
commit 4b5ac86b83
87 changed files with 5042 additions and 744 deletions

View File

@@ -1,4 +1,74 @@
# Memory
---
summary: 风险管理的长期经验教训和阈值配置
read_when: 需要回顾历史风险决策、配置风险参数、或进行季度复盘时
---
Store durable lessons, heuristics, and reminders for this agent.
# MEMORY
## 核心教训
### 1. 集中度是最大的敌人
- 单一股票超过20%仓位,无论基本面多好,都是风险管理失控
- 行业集中度超过35%时,系统性风险敞口过高
- 教训:分散化是唯一的"免费午餐"
### 2. 杠杆会放大一切
- 上涨时放大收益,下跌时加速灭亡
- 保证金使用率超过70%后,抗跌能力急剧下降
- 教训:杠杆是工具,不是能力
### 3. 流动性风险最容易被忽视
- 买入时忽略流动性,卖出时才发现无法脱身
- 日均成交量低于1000手的股票10%仓位可能需要一周才能清完
- 教训:买入前先想"怎么卖出"
### 4. 波动率不等于风险,但风险包含波动率
- 低波动率资产也可能一次性归零(如公司欺诈)
- 高波动率资产通过仓位控制可以降低风险贡献
- 教训:波动率是输入,不是结论
### 5. 风险阈值需要动态调整
- 市场环境变化时,静态阈值会失效
- 牛市可适当放宽,熊市必须收紧
- 教训:每季度评估阈值合理性
## 风险阈值配置
### 组合层面
| 指标 | 阈值 | 响应级别 |
|------|------|----------|
| 保证金使用率 | >80% | Critical |
| 组合波动率(年化) | >30% | High |
| 最大回撤(1日) | >15% | Critical |
| 权益回撤 | >20% | High |
### 集中度
| 指标 | 阈值 | 响应级别 |
|------|------|----------|
| 单一股票 | >25% | High |
| 单一行业 | >40% | High |
| 前5大持仓 | >60% | Medium |
### 流动性
| 指标 | 阈值 | 响应级别 |
|------|------|----------|
| 最低日均成交量(手) | <5000 | Medium |
| 仓位清仓时间(天) | >5 | Medium |
## 历史案例(待填充)
### 成功规避
- [日期]:成功预警[事件]风险
- 决策依据:[具体指标]
- 结果避免了X%损失
### 判断失误
- [日期]:未能识别[风险]
- 原因:[分析]
- 改进:[措施]
## 参考文献
- 《证券分析》— 风险基础
- 《随机漫步的傻瓜》— 尾部风险
- 《黑天鹅》— 不可预测性