Files
NewsImpactOnStocks/README.md
2026-01-09 09:40:42 +08:00

111 lines
1.8 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.
# 热点新闻股票影响分析工具
## 项目简介
这是一个基于DeepSeek AI的热点新闻股票影响分析工具可以分析热点新闻对股票市场的影响找出可能受影响的股票并给出投资建议。该工具实现了Coze工作流中`News_Impact_on_Stocks`的功能。
## 功能特点
- 分析热点新闻对行业的影响
- 查找与受影响行业相关的上市公司
- 分析新闻对相关公司的具体影响
- 生成详细的分析报告
- 支持交互式使用和命令行参数
- 自动保存分析结果
---
## 环境与安装
### 环境要求
- Python 3.8 或更高版本
- pip 包管理工具
### 依赖包
- openai==1.12.0
- pandas==2.2.0
- openpyxl==3.1.2
- python-dateutil==2.8.2
- pytz==2023.3
- numpy==1.24.3
### 安装方式
```bash
pip install -r requirements.txt
```
或:
```bash
pip install openai==1.12.0 pandas==2.2.0 openpyxl==3.1.2 python-dateutil==2.8.2 pytz==2023.3 numpy==1.24.3
```
---
## 使用方法
### 交互式使用
```bash
python NewsImpactOnStocks.py
```
### 命令行参数
```bash
python NewsImpactOnStocks.py --news "这里是新闻内容"
python NewsImpactOnStocks.py --file news.txt
python NewsImpactOnStocks.py --log
```
---
## 工作流程
1. 分析新闻对行业的影响
2. 查找相关上市公司
3. 分析新闻对公司影响
4. 生成分析报告
---
## 输出示例
```
🎯 公司简称(代码:股票代码)
📝 公司简介xxx
🌟 主营业务xxx
📈 影响分析xxx
```
---
## 文件结构
- NewsImpactOnStocks.py
- 上市公司信息表.xlsx
- analysis_results/
- logs/
---
## API 配置
```python
API_KEY = "your_api_key"
BASE_URL = "https://api.deepseek.com"
```
---
## 注意事项
- 首次运行会自动创建目录
- 分析结果以 Markdown 格式保存
- 默认最多分析 10 家公司
- 请确保 API Key 有效