Files
board-monitor/README.md
hubian 1fb58d23da feat: 新增历史数据存储和长时间跨度分析功能
- SQLite数据库存储每日板块数据
- 连续上涨/下跌板块分析
- 板块轮动分析
- 近5日资金流向趋势
- 查看历史数据命令 (history)
2026-04-10 17:52:14 +08:00

110 lines
2.6 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.
# A股板块盘后分析系统
自动获取东方财富板块数据,生成盘后分析报告并发送邮件。支持历史数据存储和长时间跨度分析。
## 功能特点
- 每个交易日17:00自动执行
- 获取行业板块和概念板块完整数据
- **历史数据存储**SQLite数据库
- **长时间跨度分析**(连续涨跌、板块轮动、资金趋势)
- 生成分析总结邮件正文
- 详细数据CSV文件作为附件
- 发送到指定邮箱
## 邮件内容
### 正文(分析总结)
**一、市场情绪分析**
- 市场评级(强势上涨/偏强/平稳/偏弱/弱势下跌)
- 涨跌板块统计、平均涨跌幅、资金净流
**二、资金流向分析**
- TOP5板块资金合计、资金集中度
**三、板块强弱分析**
- 强势板块数量、弱势板块数量及示例
**四、概念板块热度**
- 热门概念TOP5、冷门概念TOP5
**五、行业板块排行**
- 涨幅TOP5、跌幅TOP5
**六、主力资金排行**
- 大幅流入TOP10、大幅流出TOP10
**七、投资建议**
- 根据市场情绪给出策略建议
**八、历史趋势分析** ⭐新增
- 近期市场趋势(连续上涨/下跌/震荡)
- 近5日资金流向详情
- 连续上涨板块近3日累计涨幅
- 连续下跌板块近3日累计跌幅
- 板块轮动分析新进入涨幅TOP10
### 附件(详细数据)
CSV文件包含
- 行业板块涨跌幅排行(完整)
- 行业板块资金流向排行(完整)
- 概念板块涨跌幅排行(完整)
- 概念板块资金流向排行(完整)
## 使用方法
### 测试API连接
```bash
python3 board_monitor.py test
```
### 获取板块数据
```bash
python3 board_monitor.py get industry --limit 20
python3 board_monitor.py get concept --limit 20
```
### 手动发送报告
```bash
python3 board_monitor.py report -v
# 发送到其他邮箱
python3 board_monitor.py report --to other@example.com
```
### 查看历史数据
```bash
# 查看近5日市场统计
python3 board_monitor.py history --days 5
# 查看指定板块历史
python3 board_monitor.py history --board "电力设备" --days 10
```
## 定时任务配置
每个交易日周一至周五17:00自动执行
```
0 17 * * 1-5 python3 board_monitor.py report
```
## 数据存储
历史数据保存在 `data/board_history.db` SQLite数据库中包含
- 每日板块涨跌幅
- 主力资金流向
- 领涨股信息
## 版本历史
- v1.3.0 (2026-04-10) - 新增历史数据存储和长时间跨度分析
- v1.2.0 (2026-04-10) - 增加专业分析内容
- v1.1.0 (2026-04-10) - 改为盘后报告模式
- v1.0.0 (2026-04-10) - 初始版本