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
Metadata
Release files for sigma-terminal 3.7.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sigma_terminal-3.7.1.tar.gz | 368.4 kB | With provenance | Details for sigma_terminal-3.7.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sigma_terminal-3.7.1-py3-none-any.whl | Python 3 | none | any | Details for sigma_terminal-3.7.1-py3-none-any.whl |
Total release size: 538.2 kB
Release files / sigma_terminal-3.7.1.tar.gz
| Download URL | sigma_terminal-3.7.1.tar.gz |
|---|---|
| Size | 368.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9c19c9375d236e9f52cd367f3288db08a8902d2ae65a75cecf201ef1c02f9584
|
|
BLAKE2b-256 checksum How to use checksums |
3ad339459027190e74066890dafc2368d59ec3da3fe8d1722a0eea9ce355f6c6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 21, 2026.
Transparency logRelease files / sigma_terminal-3.7.1-py3-none-any.whl
| Download URL | sigma_terminal-3.7.1-py3-none-any.whl |
|---|---|
| Size | 169.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
326b7e92c8765b0bb36ce1452ebbfaa3b80931b28e93ebadb0d598838c380542
|
|
BLAKE2b-256 checksum How to use checksums |
2af04b79515496423c9cbe4f65baca65a3ed210ad1c419491884733b17519549
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 21, 2026.
Transparency logSecurity for sigma-terminal 3.7.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for sigma_terminal-3.7.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 21, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.