57 lines
1.5 KiB
Markdown
57 lines
1.5 KiB
Markdown
# 商品期货基本面评分面板
|
||
|
||
本仓库用于根据本地 Excel 数据生成商品期货基本面评分 HTML 面板。
|
||
|
||
## 文件说明
|
||
|
||
- `基本面评分面板.html`:当前已生成的可视化面板,可直接打开查看。
|
||
- `generate_fundamental_dashboard.py`:底层计算与 HTML 生成脚本。
|
||
- `refresh_dashboard_server.py`:本地刷新服务,支持在页面点击“刷新数据”后重新运行生成脚本。
|
||
- `wind数据汇总.xlsx`:Wind 导出的原始数据。
|
||
- `钢联数据汇总.xlsx`:钢联导出的原始数据。
|
||
- `基本面指标确认.xlsx`:各品种各维度使用的指标与公式。
|
||
- `月差拼接数据.xlsx`、`月差/`:月差相关资料。
|
||
|
||
## 更新数据后重新生成
|
||
|
||
将新的 Excel 数据覆盖到同名文件后,在仓库根目录运行:
|
||
|
||
```powershell
|
||
python generate_fundamental_dashboard.py
|
||
```
|
||
|
||
运行完成后打开 `基本面评分面板.html` 即可查看更新后的面板。
|
||
|
||
## 使用页面内“刷新数据”按钮
|
||
|
||
如果希望在浏览器页面中点击“刷新数据”自动重新计算,请先启动本地服务:
|
||
|
||
```powershell
|
||
python refresh_dashboard_server.py
|
||
```
|
||
|
||
然后用浏览器打开终端输出的地址,通常是:
|
||
|
||
```text
|
||
http://127.0.0.1:8765/基本面评分面板.html
|
||
```
|
||
|
||
通过该地址打开时,页面内“刷新数据”按钮会调用 `generate_fundamental_dashboard.py` 并刷新页面。
|
||
|
||
## Python 依赖
|
||
|
||
脚本依赖:
|
||
|
||
```text
|
||
pandas
|
||
numpy
|
||
openpyxl
|
||
```
|
||
|
||
如本机缺少依赖,可安装:
|
||
|
||
```powershell
|
||
pip install pandas numpy openpyxl
|
||
```
|
||
|