Skip to content

The Yahoo Finance Agent is an application that combines OpenAI's LLMs, the Yahoo Finance Python library, and LangChain's tools to provide real-time financial data. It features stock information, financial statements, and an interactive chat interface, all while maintaining conversation context and integrating with Langsmith for debugging

Notifications You must be signed in to change notification settings

ojasskapre/yahoo-finance-llm-agent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Yahoo Finance Agent

This application leverages OpenAI's language models, the Yahoo Finance Python library, and LangChain's agents and tools to provide users with real-time financial data and insights. Whether you're interested in stock prices, company financials, or the latest news, this assistant is here to help.

Features

  • Stock Information: Get detailed information about any stock, including historical data and recent news.
  • Financial Statements: Access income statements, balance sheets, and cash flow statements, both annual and quarterly.
  • Options Data: Explore available options expiration dates and detailed options chains.
  • Holders and Recommendations: View information about major holders, insider transactions, and analyst recommendations.
  • Interactive Chat Interface: Engage with the assistant through a user-friendly chat interface built with Streamlit.
  • LangChain Integration: Utilizes LangChain's agents and tools for efficient task management and interaction with various data sources.
  • Conversation Buffer Memory: Maintains the context of the conversation by passing chat message history to the model, ensuring more coherent and context-aware responses over the course of the interaction.
  • Powered by OpenAI: Leverages OpenAI's language model to generate responses and provide insights based on user queries.
  • Langsmith: Integrated with Langsmith to easily debug, analyze and visualize the agent's conversation flow and model outputs.
  • Model Selection: Flexibly choose from different OpenAI models (e.g., gpt-4o, gpt-4o-mini, gpt-3.5-turbo-0125) directly from the sidebar to customize the performance and capabilities of the assistant based on your needs.

Installation

  1. Clone the Repository
git clone git@github.com:ojasskapre/yahoo-finance-llm-agent.git
cd yahoo-finance-llm-agent
  1. Install Dependencies
pip install -r requirements.txt
  1. Copy the .env.sample file to .env and add the OpenAI API key. To enable tracing using Langsmith, add Langchain API Key and Project name as well.
OPENAI_API_KEY=<YOUR_OPENAI_KEY_HERE>
LANGCHAIN_TRACING_V2=true
LANGCHAIN_ENDPOINT="https://api.smith.langchain.com"
LANGCHAIN_API_KEY="<YOUR_LANGCHAIN_API_KEY>"
LANGCHAIN_PROJECT="<YOUR_PROJECT_NAME_HERE>"
  1. To start the Streamlit app, run the following command:
streamlit run app.py

Resources

About

The Yahoo Finance Agent is an application that combines OpenAI's LLMs, the Yahoo Finance Python library, and LangChain's tools to provide real-time financial data. It features stock information, financial statements, and an interactive chat interface, all while maintaining conversation context and integrating with Langsmith for debugging

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published