Skip to content

tirth1263/finance-agent

Repository files navigation

DeepSeek Finance Agent

Python Agno Website

DeepSeek Finance Agent is an AI-powered financial research assistant built with the Agno framework. It combines a Nebius-hosted language model, Yahoo Finance market data, and DuckDuckGo web search so you can ask natural-language questions about stocks, fundamentals, analyst recommendations, and current market news.

The project is designed to be easy to run locally, simple to deploy to a Python web host, and attractive to explore from the public project website.

Live Project

What It Can Do

  • Fetch live and historical stock prices through YFinance.
  • Pull company fundamentals such as market cap, revenue, earnings, and P/E ratios.
  • Surface analyst recommendations and sentiment context.
  • Search the web for recent financial news and market-moving events.
  • Format financial data in clean markdown tables.
  • Answer comparison questions across tickers, sectors, or time windows.
  • Run inside the Agno Playground for an interactive browser-based chat experience.

Tech Stack

Layer Technology
Agent framework Agno 1.x Playground
Model provider Nebius Token Factory
Default model deepseek-ai/DeepSeek-V3-0324
Finance data YFinance
Web search DuckDuckGo via ddgs
App server Agno Playground on FastAPI/Uvicorn
Public website GitHub Pages

The app pins Agno to the 1.x line because this project intentionally uses the Playground API shown in the reference implementation. The model can be changed with NEBIUS_MODEL_ID. For example, you can set it to meta-llama/Llama-3.3-70B-Instruct if you want to mirror the Llama configuration often used in Agno finance-agent examples.

Project Structure

finance-agent/
+-- finance_agent/
|   +-- __init__.py
|   +-- agent.py
+-- docs/
|   +-- index.html
|   +-- styles.css
|   +-- app.js
+-- main.py
+-- requirements.txt
+-- pyproject.toml
+-- Dockerfile
+-- Procfile
+-- render.yaml
+-- README.md

Quick Start

1. Clone the repository

git clone https://github.com/tirth1263/finance-agent.git
cd finance-agent

2. Create a virtual environment

python -m venv .venv

# Windows PowerShell
.\.venv\Scripts\Activate.ps1

# macOS/Linux
source .venv/bin/activate

3. Install dependencies

pip install -r requirements.txt

If you use uv, this project is also compatible with:

uv sync

4. Configure environment variables

Copy the example file:

cp .env.example .env

On Windows PowerShell:

Copy-Item .env.example .env

Then edit .env:

NEBIUS_API_KEY=your_nebius_api_key_here
NEBIUS_MODEL_ID=deepseek-ai/DeepSeek-V3-0324
AGNO_DEBUG=false

Get a Nebius API key from Nebius Token Factory.

5. Run the application

python main.py

The Playground API starts on:

http://localhost:8000

If your hosting provider sets a PORT environment variable, the app automatically uses it.

Example Queries

Try questions like:

"What's the current price of AAPL stock?"
"Show me analyst recommendations for TSLA"
"Get the latest financial news about Bitcoin"
"What are the fundamentals of MSFT?"
"Compare GOOGL and AMZN performance over the last month"
"What's the market cap of NVIDIA?"
"Show me the P/E ratio of Amazon"
"Get the latest earnings report for Apple"

Deployment

Deploy the Python agent

This repository includes deployment files for common Python hosts:

  • Procfile for Heroku-style platforms.
  • render.yaml for Render.
  • Dockerfile for container platforms.

Required production environment variable:

NEBIUS_API_KEY=your_production_nebius_api_key

Optional production variables:

NEBIUS_MODEL_ID=deepseek-ai/DeepSeek-V3-0324
AGNO_DEBUG=false
PORT=8000

Deploy the project website

The docs/ folder is a static website ready for GitHub Pages. In this repository it is configured to publish from the main branch and /docs folder.

Security and Privacy

  • API keys are loaded from environment variables and are never committed to the repo.
  • .env is ignored by Git.
  • DuckDuckGo is used for privacy-focused web search.
  • The agent does not intentionally store personal data or user prompts in this codebase.
  • Financial responses should be treated as research support, not personalized investment advice.

Troubleshooting

Issue Fix
NEBIUS_API_KEY error Confirm .env exists and the key is valid.
Port already in use Set PORT=8001 or another available port before running.
No finance data returned Check internet connectivity and the ticker symbol.
Search results fail Reinstall dependencies with pip install -r requirements.txt.
Model errors Confirm the selected NEBIUS_MODEL_ID is available to your Nebius account.

Contributing

Contributions are welcome. A good pull request should:

  1. Keep the agent behavior focused on financial research.
  2. Avoid committing secrets or generated local files.
  3. Add clear docs when adding a new tool or deployment path.
  4. Test the app with at least one stock-price query and one news query.

Disclaimer

This project is for educational and research purposes. Market data can be delayed, incomplete, or unavailable, and AI-generated analysis can be wrong. Always verify important financial information before making decisions.

About

Agno-powered AI finance agent for stock analysis, market news, and financial research.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors