Skip to main content

Financial Research Agent

Project description

σ Sigma

Financial Research Agent

Sigma is an autonomous AI-powered financial research agent that provides institutional-grade market analysis. It combines multiple LLM providers with real-time market data to deliver comprehensive stock analysis, portfolio insights, and actionable investment research.

Features

  • Real-Time Market Data via yfinance

    • Stock quotes, historical prices, financial statements
    • Analyst recommendations, insider trading, institutional holdings
    • Options chains, dividends, earnings calendars
    • Sector performance, market indices, market movers
  • 18+ Financial Tools

    • get_stock_quote - Real-time price and key metrics
    • get_company_info - Business description, financials
    • get_financial_statements - Income, balance sheet, cash flow
    • get_analyst_recommendations - Ratings and price targets
    • get_insider_trades - Recent insider activity
    • get_institutional_holders - Top institutional owners
    • get_options_chain - Calls and puts data
    • get_dividends - Dividend history and yield
    • technical_analysis - RSI, MACD, moving averages
    • compare_stocks - Multi-stock comparison
    • get_market_movers - Top gainers/losers
    • get_sector_performance - Sector ETF performance
    • And more...
  • Multiple LLM Providers

    • OpenAI (GPT-4o)
    • Anthropic (Claude)
    • Google (Gemini)
    • Groq (Llama)
    • xAI (Grok)
    • Ollama (local models)
  • Clean Terminal UI

    • Minimal, Claude Code-inspired interface
    • Real-time tool execution display
    • Markdown-formatted responses with tables

Installation

# Clone the repository
git clone https://github.com/your-username/sigma.git
cd sigma

# Install dependencies
pip install -e .

# Set up your API keys
cp .env.example .env
# Edit .env with your API keys

Configuration

Create a .env file with your API keys:

# LLM Providers (at least one required)
GOOGLE_API_KEY=your-google-api-key
OPENAI_API_KEY=your-openai-api-key
ANTHROPIC_API_KEY=your-anthropic-api-key
GROQ_API_KEY=your-groq-api-key
XAI_API_KEY=your-xai-api-key

# Optional: Financial data APIs (for additional data sources)
FMP_API_KEY=your-fmp-api-key
POLYGON_API_KEY=your-polygon-api-key

Usage

Interactive Mode

sigma
  σ Sigma Financial Research Agent

  Provider: google │ Model: gemini-2.0-flash
  Type /help for commands, /quit to exit

  > Analyze NVDA stock

  → get_stock_quote(NVDA) ✓ 245ms
  → get_company_info(NVDA) ✓ 312ms
  → get_analyst_recommendations(NVDA) ✓ 187ms
  → technical_analysis(NVDA) ✓ 423ms

  Called 4 tools in 1.2s

  ## NVIDIA (NVDA) Analysis

  **Current Price:** $191.13
  **Market Cap:** $4.67T
  ...

Commands

  • /provider <name> - Switch LLM provider (openai, anthropic, google, groq, ollama)
  • /model <name> - Set model name
  • /clear - Clear conversation history
  • /status - Show current configuration
  • /help - Show help
  • /quit - Exit

Example Queries

> What is the current price of AAPL?
> Compare MSFT, GOOGL, and AMZN on valuation metrics
> Give me a comprehensive analysis of Tesla
> What are the top market gainers today?
> Technical analysis on SPY
> Show me insider trades for NVDA
> What's the options chain for AAPL?

Python API

import asyncio
from sigma import SigmaAgent, LLMProvider

async def main():
    # Create agent
    agent = SigmaAgent(provider=LLMProvider.GOOGLE)
  
    # Run analysis
    result = await agent.run("Analyze AAPL stock")
    print(result)
  
    # Get execution stats
    stats = agent.get_stats()
    print(f"Tools called: {stats['tools_called']}")

asyncio.run(main())

Architecture

sigma/
├── core/
│   ├── agent.py      # Main agent logic
│   ├── config.py     # Configuration management
│   ├── llm.py        # LLM provider implementations
│   └── models.py     # Data models
├── tools/
│   └── financial.py  # Financial data tools (yfinance)
├── ui/
│   └── __init__.py   # UI components
└── app.py            # CLI application

Requirements

  • Python 3.10+
  • httpx
  • pydantic
  • pydantic-settings
  • rich
  • yfinance
  • pandas
  • numpy

License

Check File


Sigma - Institutional-grade financial research at your fingertips.

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

sigma_terminal-2.0.1.tar.gz (55.4 kB view details)

Uploaded Source

Built Distribution

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

sigma_terminal-2.0.1-py3-none-any.whl (54.7 kB view details)

Uploaded Python 3

File details

Details for the file sigma_terminal-2.0.1.tar.gz.

File metadata

  • Download URL: sigma_terminal-2.0.1.tar.gz
  • Upload date:
  • Size: 55.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for sigma_terminal-2.0.1.tar.gz
Algorithm Hash digest
SHA256 c6667d83fab3f449e59b1409b01a10f112374709fd24f05d2f2338af3a714017
MD5 8c748574cdc1b906798fc23cc27a9413
BLAKE2b-256 bddc10164b7241aad09f63f520fcabcd39c1b9c847a09ff31bd6593a697f4dcd

See more details on using hashes here.

File details

Details for the file sigma_terminal-2.0.1-py3-none-any.whl.

File metadata

  • Download URL: sigma_terminal-2.0.1-py3-none-any.whl
  • Upload date:
  • Size: 54.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for sigma_terminal-2.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f0131cc3383ff8211f98d4638634826eacc282543c0559b359f5f18394dbd1f2
MD5 ba97a655073e4e7781b60117854bef77
BLAKE2b-256 12424576ce399c35d0e646aa4573d27fafa3876f2e87206b1478d5998c3aead9

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