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.2.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.2-py3-none-any.whl (54.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sigma_terminal-2.0.2.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.2.tar.gz
Algorithm Hash digest
SHA256 49792a474d35d5539cef8ad1b2b57f14177da1e84d7a23fa5562b9231cde698f
MD5 771ed1d7e968e475a8fdf31eaae76ad1
BLAKE2b-256 ff917f553b908102123587679112319bf3ac7b6869f2f3175c04db27e35e127c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: sigma_terminal-2.0.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 289a762c0fd116f5c69f8947c3df837d1c4e6622bbcd60e71d68d72cabc7f73b
MD5 e0b55d778a51c0f81136befd72cf7bfc
BLAKE2b-256 2a94387b909482d9c6ca03847f48f0b85dc86a33f954a0dc2685e7abbd905571

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