Sigma - Finance Research Agent
Project description
Sigma
Terminal-native financial research
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 |
|---|---|---|
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9c19c9375d236e9f52cd367f3288db08a8902d2ae65a75cecf201ef1c02f9584
|
|
| MD5 |
2f86099c64b545186cdd8c0fe5895111
|
|
| BLAKE2b-256 |
3ad339459027190e74066890dafc2368d59ec3da3fe8d1722a0eea9ce355f6c6
|
Provenance
The following attestation bundles were made for sigma_terminal-3.7.1.tar.gz:
Publisher:
release.yml on desenyon/sigma
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sigma_terminal-3.7.1.tar.gz -
Subject digest:
9c19c9375d236e9f52cd367f3288db08a8902d2ae65a75cecf201ef1c02f9584 - Sigstore transparency entry: 1154703669
- Sigstore integration time:
-
Permalink:
desenyon/sigma@b4de6b3fdf8d4f13c35d7953602f8585a5b7bad1 -
Branch / Tag:
refs/tags/v3.7.1 - Owner: https://github.com/desenyon
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@b4de6b3fdf8d4f13c35d7953602f8585a5b7bad1 -
Trigger Event:
push
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
326b7e92c8765b0bb36ce1452ebbfaa3b80931b28e93ebadb0d598838c380542
|
|
| MD5 |
834ca0159d27bf4f6d38437ea7ad760c
|
|
| BLAKE2b-256 |
2af04b79515496423c9cbe4f65baca65a3ed210ad1c419491884733b17519549
|
Provenance
The following attestation bundles were made for sigma_terminal-3.7.1-py3-none-any.whl:
Publisher:
release.yml on desenyon/sigma
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sigma_terminal-3.7.1-py3-none-any.whl -
Subject digest:
326b7e92c8765b0bb36ce1452ebbfaa3b80931b28e93ebadb0d598838c380542 - Sigstore transparency entry: 1154703670
- Sigstore integration time:
-
Permalink:
desenyon/sigma@b4de6b3fdf8d4f13c35d7953602f8585a5b7bad1 -
Branch / Tag:
refs/tags/v3.7.1 - Owner: https://github.com/desenyon
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@b4de6b3fdf8d4f13c35d7953602f8585a5b7bad1 -
Trigger Event:
push
-
Statement type: