Skip to main content

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 交互: 简洁的命令行交互界面。

快速开始

前置要求

安装

  1. 克隆项目或进入项目目录:

    cd fin-agent
    
  2. 安装依赖:

    pip install -r requirements.txt
    
  3. 配置环境变量: 复制 .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


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.4.tar.gz (10.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fin_agent-0.1.4-py3-none-any.whl (10.1 kB view details)

Uploaded Python 3

File details

Details for the file fin_agent-0.1.4.tar.gz.

File metadata

  • Download URL: fin_agent-0.1.4.tar.gz
  • Upload date:
  • Size: 10.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.0

File hashes

Hashes for fin_agent-0.1.4.tar.gz
Algorithm Hash digest
SHA256 5e5844fe8afcd197b60795566859ce808f91aa0293be7c741cb6bad552e9104e
MD5 33dc6e1e05b62ef9831618d232cad496
BLAKE2b-256 263511204b07b89db8d2970d1db08f42d8a1c71c8f694888abf4599e4d3cb457

See more details on using hashes here.

File details

Details for the file fin_agent-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: fin_agent-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 10.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.0

File hashes

Hashes for fin_agent-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 1ea213ca17770436000fd5a748120144ad69e8fbc791030362f77edbcf88259d
MD5 5fa2beb13d744873e152a4f07a97ec46
BLAKE2b-256 c34f736d6e5851e8a60c6001da61d4dec9a888e0e32da3d2d978c45fbcb8b549

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page