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

Uploaded Python 3

File details

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

File metadata

  • Download URL: financial_stock_agent-0.1.2.tar.gz
  • Upload date:
  • Size: 139.1 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.2.tar.gz
Algorithm Hash digest
SHA256 48fe82527741d25ff7f190fd538032c91bfb2d2689099c29923e02d807381450
MD5 9e81c7c041cd7ad5fae8d6d744a5ab6f
BLAKE2b-256 286d94dff38f577deb94bb4946c2a3d5e788ef170bbd6fc07123d6f14773895d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: financial_stock_agent-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 8.2 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 62401ab70fc7fe7a52ba67dc43557b915da0dd94fcc57a7eeffdfe80e1f1da4d
MD5 82d51ea9793aa1d7ca93a3f194aa809e
BLAKE2b-256 ff7eabf0d788fe904ed6ab82383f1f181e3d7ccfaf9572c559d889b85d44b835

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