Skip to main content

llama-index tools yahoo_finance integration

Project description

Yahoo Finance Tool

This tool connects to Yahoo Finance and allows an Agent to access stock, news, and financial data of a company.

Installation

pip install llama-index-tools-yahoo-finance

Usage

Here's an example of how to use this tool:

from llama_index.tools.yahoo_finance import YahooFinanceToolSpec
from llama_index.core.agent.workflow import FunctionAgent
from llama_index.llms.openai import OpenAI

tool_spec = YahooFinanceToolSpec()
agent = FunctionAgent(
    tools=tool_spec.to_tool_list(),
    llm=OpenAI(model="gpt-4.1"),
)

print(await agent.run("What is the price of Apple stock?"))
print(await agent.run("What is the latest news about Apple?"))

The tools available are:

balance_sheet: A tool that returns the balance sheet of a company.

income_statement: A tool that returns the income statement of a company.

cash_flow: A tool that returns the cash flow of a company.

stock_news: A tool that returns the latest news about a company.

stock_basic_info: A tool that returns basic information about a company including price.

stock_analyst_recommendations: A tool that returns analyst recommendations for a company.

This loader is designed to be used as a way to load data as a Tool in a Agent.

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

llama_index_tools_yahoo_finance-0.5.0.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

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

File details

Details for the file llama_index_tools_yahoo_finance-0.5.0.tar.gz.

File metadata

  • Download URL: llama_index_tools_yahoo_finance-0.5.0.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","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":true}

File hashes

Hashes for llama_index_tools_yahoo_finance-0.5.0.tar.gz
Algorithm Hash digest
SHA256 1527af0699b34e4bfcfb9ee6e568eb23844bd3b5bd2cc0810c2e83ee3200c47c
MD5 8aa4098c4b6724406b7ab007e7a10856
BLAKE2b-256 1d5bf2d24f9abfa075d9803732f22eb73877e4e357daa8e3769b482c12a4501c

See more details on using hashes here.

File details

Details for the file llama_index_tools_yahoo_finance-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: llama_index_tools_yahoo_finance-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 3.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","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":true}

File hashes

Hashes for llama_index_tools_yahoo_finance-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 698499e45f47923ff8ffb44d9d0c3c23c2467ce05940fe48e837f51ac61923a7
MD5 db583d29cfab6608be32d6deb3ee46a7
BLAKE2b-256 9288a7b7cbfc84abd5a705b187204b3b3d7e182d2ad416b23036366ba027023a

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