Files
qihuo/docs/STATS.md
T
dekun 169136dd4a Add modular docs with index, WeChat templates, and AI guide.
Document per-module order logic, risk rules, and WeChat message templates with a central INDEX for navigation.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-28 10:49:10 +08:00

57 lines
1.1 KiB
Markdown
Raw 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.
# 统计分析
**页面路径**`/stats`
**相关文件**`stats_engine.py``app.py``/api/stats`
---
## 功能概述
### 汇总指标(页顶卡片)
总交易次数、胜率、平均盈利/亏损、盈亏比、连续亏损、最大回撤、最大盈亏金额及占比、累计手续费、情绪单数量/占比。
进入页面自动加载 `/api/stats`,无手动「重新计算」按钮。
### 分项统计
下拉维度:按时间、周、月、品种、手续费、方向、交易类型、情绪单等,表格展示分组指标。
---
## 下单逻辑
**无**。只读展示,不触发报单。
---
## 风控规则
**无**。统计结果不影响账户状态。
---
## 数据来源
| 表 | 用途 |
|----|------|
| `trade_logs` | 主:成交、盈亏、手续费 |
| `review_records` | 情绪单标记等 |
| `stats_cache` | 缓存加速 |
开单计划的 `trade_records` **不计入** 此处主统计(除非另有合并逻辑)。
---
## 微信推送
**无**
---
## 相关文档
- [RECORDS.md](./RECORDS.md)
- [FEES.md](./FEES.md) — 手续费计算