A financial analysis agent powered by DeepSeek and Tushare
Project description
Fin-Agent
Fin-Agent 是一个基于 DeepSeek 大模型和 Tushare 金融数据的全自动金融领域数据分析及股票推荐 Agent。它是一个 CLI(命令行)工具,能够根据用户输入的自然语言需求,自动规划任务、调用工具获取数据并生成分析结果。
特性
- 智能规划: 基于 DeepSeek V3 (兼容 OpenAI 接口) 进行任务拆解和工具调用。
- 丰富数据: 集成 Tushare Pro 接口,支持获取股票基本信息、日线行情等数据。
- CLI 交互: 简洁的命令行交互界面。
快速开始
前置要求
- Python 3.8+
- Tushare Pro 账号及 Token
- DeepSeek API Key
安装
-
克隆项目或进入项目目录:
cd fin-agent
-
安装依赖:
pip install -r requirements.txt
-
配置环境变量: 复制
.env.example为.env,并填入你的 API Key:cp .env.example .env # 编辑 .env 文件
.env文件内容示例:TUSHARE_TOKEN=your_tushare_token_here DEEPSEEK_API_KEY=your_deepseek_api_key_here DEEPSEEK_BASE_URL=https://api.deepseek.com DEEPSEEK_MODEL=deepseek-chat
运行
启动 Agent:
python main.py
使用示例
在命令行提示符下输入你的需求:
- "查一下平安银行最近一个月的股价走势"
- "分析一下万科A的基本面"
- "推荐几只最近涨势比较好的银行股" (Agent 会尝试通过数据分析给出建议)
项目结构
main.py: 程序入口。agent/: Agent 核心逻辑 (Planning & Execution)。llm/: 大模型接口封装 (DeepSeek)。tools/: 工具集封装 (Tushare)。config.py: 配置管理。
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
fin_agent-0.1.2.tar.gz
(10.1 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
fin_agent-0.1.2-py3-none-any.whl
(10.2 kB
view details)
File details
Details for the file fin_agent-0.1.2.tar.gz.
File metadata
- Download URL: fin_agent-0.1.2.tar.gz
- Upload date:
- Size: 10.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ee3e3ec1964a75d11f0aaf13f824278f08a1e7ca76b141fb6922e885ef24edd2
|
|
| MD5 |
1f9eb8d5a2d891622926127eb7932d58
|
|
| BLAKE2b-256 |
4919471a85e2a240ccd20a7a830b36fb6378bc4814e02ad9ffd1ad0ff784e28f
|
File details
Details for the file fin_agent-0.1.2-py3-none-any.whl.
File metadata
- Download URL: fin_agent-0.1.2-py3-none-any.whl
- Upload date:
- Size: 10.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c8cd365e47dbf2166daa48292e5f4e7cff438fe7189ebe7c02af7d97d5616c2d
|
|
| MD5 |
ef635b05b44e2a5f0707357f1fa3ed98
|
|
| BLAKE2b-256 |
2ed60796089240ace76c53549e431a1a43d5a535fe7ec5c9d4aa956393e03129
|