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

Uploaded Python 3

File details

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

File metadata

  • Download URL: fin_agent-0.1.0.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

Hashes for fin_agent-0.1.0.tar.gz
Algorithm Hash digest
SHA256 42cbb34c7be38bcee6a784ae5bbce1d4285025189e9b9b7526f0cf54ed7aa40f
MD5 3a38fe0e1e703a80a489a4f08e5ccc15
BLAKE2b-256 3897720abe16dd737959781c07de8ec78dc76180b9f8c4a61614e7efcc2fff13

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fin_agent-0.1.0-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

Hashes for fin_agent-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 616c0f875d2c20bf2f905ca426acec3a69ceb0152cdc32450ace0571839b301d
MD5 441fe2c1d6a4d19a7b42552a5204ed8e
BLAKE2b-256 6bc1fb9e0866e7637c232bc4d589c2c7408aa2d505bc59977682896ac8c529f9

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