Skip to main content

A agent to facilitate querying and processing finance data.

Project description

finance_agent

finance_agent is a Python-based financial data agent designed to collect, cache, analyze, and query stock market data from multiple financial data sources.

The initial implementation focuses on the Taiwan stock market using data from Yahoo Finance.


Repo Introduction

Below is the introduction of files in this repo:

./
├── docs
│   └── design_doc_v1.md
├── finance_agent
│   ├── agent
│   │   └── __...
│   ├── config
│   │   └── __...
│   ├── database
│   │   └── __...
│   ├── tools
│   │   └── __...
│   └── utils
│       └── __...
├── labs
│   └── yfinance_study.ipynb
├── LICENSE
├── main.py
├── pyproject.toml
├── README.md
├── tests
└── uv.lock
  • finance_agent/

    • Main Python package of the project.
    • Can be installed as a reusable package using:
      pip install financial-stock-agent
      
    • Contains the core implementation of the finance agent system.
  • finance_agent/agent/

    • Holds the implementation of AI agents and orchestration logic.
    • Responsible for handling user requests and coordinating tools/services.
  • finance_agent/config/

    • Stores configuration-related modules.
    • Used for environment settings, constants, and application configuration management.
  • finance_agent/database/

    • Contains database access and persistence logic.
    • Responsible for interacting with SQLite/PostgreSQL and managing cached financial data.
  • finance_agent/tools/

    • Provides reusable tools and integrations.
    • Examples include Yahoo Finance data fetchers, stock screeners, or dividend analyzers.
  • finance_agent/utils/

    • Utility/helper functions shared across the project.
    • Includes common helpers such as logging, date formatting, and data conversion.
  • labs/

    • Used for experimental code, prototypes, and research notebooks.
    • Safe place for trying ideas before moving them into production code.
    • Example:
      • yfinance_study.ipynb — experimentation with the yfinance package.
  • docs/

    • Stores project documentation.
    • Includes system design documents, architecture notes, API specs, and development guides.
    • Example:
      • design_doc_v1.md — initial system design document.
  • tests/

    • Contains unit tests and integration tests.
    • Used to validate application behavior and ensure code quality.
  • pyproject.toml

    • Python project configuration file.
    • Defines dependencies, package metadata, build system, and tooling configuration.
  • uv.lock

    • Dependency lock file generated by uv.
    • Ensures reproducible package installation across environments.
  • README.md

    • Main project overview and onboarding document.
    • Typically includes setup instructions, usage examples, and project goals.
  • LICENSE

    • Defines the software license and usage permissions of the project.

Features

Data Collection

  • Pull historical stock market data from Yahoo Finance
  • Support Taiwan stock symbols (e.g. 2330.TW, 0050.TW)
  • Scheduled or on-demand data synchronization

Local Database Cache

  • Store pulled historical data locally
  • Initial database backend: SQLite
  • Designed for future migration to PostgreSQL or other databases

Agent-Based Query Interface

Users can interact with the agent using natural language queries such as:

  • "Stocks that increased over 5% today"
  • "Stocks with dividend yield over 5%"
  • "Top gaining Taiwan stocks this week"
  • "Show historical price trend for TSMC"

Extensible Architecture

Planned future support:

  • Multiple financial data providers
  • Additional stock markets
  • LLM-powered financial analysis
  • Technical indicators
  • Portfolio tracking
  • REST API / Web UI

Tech Stack

  • Python
  • SQLite
  • Yahoo Finance
  • yfinance
  • SQLAlchemy (planned)
  • Pandas

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

financial_stock_agent-0.1.3.tar.gz (149.6 kB view details)

Uploaded Source

Built Distribution

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

financial_stock_agent-0.1.3-py3-none-any.whl (10.5 kB view details)

Uploaded Python 3

File details

Details for the file financial_stock_agent-0.1.3.tar.gz.

File metadata

  • Download URL: financial_stock_agent-0.1.3.tar.gz
  • Upload date:
  • Size: 149.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.12 {"installer":{"name":"uv","version":"0.11.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for financial_stock_agent-0.1.3.tar.gz
Algorithm Hash digest
SHA256 9979899d009c2fad572222098792fa1f7c273be61d85cbbcf3e78d7c19098bf7
MD5 04953db57913f33a0ef7a5a24a0363d3
BLAKE2b-256 a24469d4b9ef197571e55c9284bef74eed1982a14fc3eb8146a4c6f453bf2925

See more details on using hashes here.

File details

Details for the file financial_stock_agent-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: financial_stock_agent-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 10.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.12 {"installer":{"name":"uv","version":"0.11.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for financial_stock_agent-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 381355152632fd3e5812cd9c315ea2ebbfe943b874c9c3d510399e6a7f89da76
MD5 8eb76dba93afc9f1328377a4ce402ed4
BLAKE2b-256 a874b5fc95b7101a9f556010b88b4e641b1ba835011bbf4d7b8ab9b45f7c23cc

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