Skip to main content

Sigma - Finance Research Agent

Project description

Sigma

Terminal-native financial research

Version UI Python

A keyboard-driven research environment that pairs multi-provider LLMs with market data and tooling in the terminal. Configure keys locally, choose cloud or local models, and stay in flow without leaving the shell.


The interface

Sigma is built around two surfaces: a full-screen terminal UI (TUI) for interactive work, and a CLI for quick commands, health checks, and scripting.

Full-screen terminal (Textual)

Launch sigma or python -m sigma
Layout Scrollable conversation, tool activity inline, fixed input row at the bottom
Theme Dark, low-distraction palette (Tokyo Night–inspired)
Input Type natural-language prompts; optional Tab behavior for inline suggestions when Ollama is available

Keyboard

Shortcut Action
Ctrl+C Quit
Ctrl+L Clear the chat view

On first launch, the setup wizard can walk through optional local (Ollama) and API configuration.

Command-line interface

Command Purpose
sigma Open the TUI (after an optional splash and quick-reference panel)
sigma doctor Check Python imports, ollama / lean on PATH, and which API keys are present
sigma --status Show active provider, model, Ollama reachability, LEAN hints, and key status
sigma ask "…" Single-shot LLM query with tools (non-interactive)
sigma quote SYM … Tabular quotes
sigma chart SYM --period 1y Render a chart under ~/.sigma/charts (optional -o copy path)
sigma backtest SYM -s STRATEGY Built-in yfinance strategy backtests
sigma compare SYM … Side-by-side comparison metrics
sigma --list-models Reference list of suggested models by provider
sigma --setkey PROVIDER KEY Store a key in ~/.sigma/config.env
sigma --setup Run the setup wizard

Use sigma -h for the full option list (including --version, --provider, --model).


Capabilities

  • Models: Route requests through supported providers (e.g. OpenAI, Anthropic, Google Gemini, Groq, xAI) or Ollama locally, via the LLM router and your config.
  • Data & tools: Stock quotes, history, comparisons, technicals, and integrations such as Polygon.io, Alpha Vantage, and Exa when keys are set.
  • Backtesting: Built-in strategies over historical data (yfinance-backed engine); optional QuantConnect LEAN CLI for advanced workflows when installed.
  • Privacy posture: API keys and config live under your user account (e.g. ~/.sigma/config.env); choose what you enable.

Requirements

  • Python 3.11+
  • Ollama (optional, recommended for local models)
  • LEAN CLI (optional, for LEAN-based backtests)

Installation

Use a virtual environment (recommended):

git clone https://github.com/desenyon/sigma.git
cd sigma
python3 -m venv .venv
source .venv/bin/activate   # Windows: .venv\Scripts\activate
pip install -r requirements.txt
# or: pip install -e ".[dev]"

Start the app:

sigma
# or
python -m sigma

Configuration

Environment variables and ~/.sigma/config.env control providers and models. See .env.example for variable names (e.g. OPENAI_API_KEY, POLYGON_API_KEY, DEFAULT_MODEL, OLLAMA_HOST).

Model IDs (2026 reference)

Defaults in code target current-tier APIs. Override with DEFAULT_MODEL or sigma --model <id>.

Provider Default id Notes
Google gemini-3.1-pro Flash: gemini-3-flash
OpenAI gpt-5.4 Also: gpt-5.2, gpt-5, o3-preview, …
Anthropic claude-sonnet-4-6 Opus: claude-opus-4-6
Groq llama-3.3-70b-versatile Hosted Llama / Mixtral on Groq
xAI grok-4 Fast: grok-4-mini
Ollama qwen3.5:8b Local; run sigma --list-models for the full suggestion list

Exact API names change with providers; if a call fails, switch to another id from sigma --list-models or your provider’s docs.


Architecture (overview)

Layer Role
TUI Textual application: chat, tool messages, input widgets
CLI argparse + Rich: doctor, status, one-shot commands
LLM Router and provider clients; tool calls from the model
Tools Registry exposing data and analysis functions to the model
Backtest Python engine and optional LEAN integration

Contributing

Contributions are welcome. Open an issue or pull request on the repository.


License

See LICENSE.


Links

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-3.7.1.tar.gz (368.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-3.7.1-py3-none-any.whl (169.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sigma_terminal-3.7.1.tar.gz
  • Upload date:
  • Size: 368.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for sigma_terminal-3.7.1.tar.gz
Algorithm Hash digest
SHA256 9c19c9375d236e9f52cd367f3288db08a8902d2ae65a75cecf201ef1c02f9584
MD5 2f86099c64b545186cdd8c0fe5895111
BLAKE2b-256 3ad339459027190e74066890dafc2368d59ec3da3fe8d1722a0eea9ce355f6c6

See more details on using hashes here.

Provenance

The following attestation bundles were made for sigma_terminal-3.7.1.tar.gz:

Publisher: release.yml on desenyon/sigma

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: sigma_terminal-3.7.1-py3-none-any.whl
  • Upload date:
  • Size: 169.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for sigma_terminal-3.7.1-py3-none-any.whl
Algorithm Hash digest
SHA256 326b7e92c8765b0bb36ce1452ebbfaa3b80931b28e93ebadb0d598838c380542
MD5 834ca0159d27bf4f6d38437ea7ad760c
BLAKE2b-256 2af04b79515496423c9cbe4f65baca65a3ed210ad1c419491884733b17519549

See more details on using hashes here.

Provenance

The following attestation bundles were made for sigma_terminal-3.7.1-py3-none-any.whl:

Publisher: release.yml on desenyon/sigma

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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