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.5.tar.gz (10.5 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.5-py3-none-any.whl (10.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: fin_agent-0.1.5.tar.gz
  • Upload date:
  • Size: 10.5 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.5.tar.gz
Algorithm Hash digest
SHA256 4c6d866287e1c4ed17801e376465f9eafda6b487ae0dae8a147eb00860e73bdf
MD5 88b1d761e7eba423c824d643a62c3595
BLAKE2b-256 578f41c876ecdb35ed2f33926ca4021ee0ecc0dc594b56b065f2699ad0843378

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fin_agent-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 10.5 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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 e4c471de711c108ac4f3daf4f0f66379fc9738a15b00b87559f7fca66cddcd24
MD5 29d2f5bcbffc70bbe65ce626743a838c
BLAKE2b-256 67a188988c6403aa80ee9b94b3241f6c190fa59f3dfbd1998f3bd7d5c8a5ab30

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