sigma-terminal 3.3.2__tar.gz → 3.4.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- sigma_terminal-3.4.1/PKG-INFO +272 -0
- sigma_terminal-3.4.1/README.md +212 -0
- {sigma_terminal-3.3.2 → sigma_terminal-3.4.1}/pyproject.toml +4 -4
- {sigma_terminal-3.3.2 → sigma_terminal-3.4.1}/scripts/build.sh +1 -1
- {sigma_terminal-3.3.2 → sigma_terminal-3.4.1}/scripts/create_app.py +1 -1
- {sigma_terminal-3.3.2 → sigma_terminal-3.4.1}/sigma/__init__.py +5 -5
- sigma_terminal-3.4.1/sigma/app.py +1255 -0
- {sigma_terminal-3.3.2 → sigma_terminal-3.4.1}/sigma/charts.py +33 -8
- {sigma_terminal-3.3.2 → sigma_terminal-3.4.1}/sigma/cli.py +11 -11
- {sigma_terminal-3.3.2 → sigma_terminal-3.4.1}/sigma/config.py +175 -34
- {sigma_terminal-3.3.2 → sigma_terminal-3.4.1}/sigma/llm.py +160 -13
- {sigma_terminal-3.3.2 → sigma_terminal-3.4.1}/sigma/setup.py +16 -16
- {sigma_terminal-3.3.2 → sigma_terminal-3.4.1}/sigma/tools.py +868 -3
- sigma_terminal-3.4.1/tests/test_comprehensive.py +510 -0
- sigma_terminal-3.4.1/tests/verify_ui.py +103 -0
- sigma_terminal-3.3.2/PKG-INFO +0 -444
- sigma_terminal-3.3.2/README.md +0 -384
- sigma_terminal-3.3.2/sigma/app.py +0 -856
- {sigma_terminal-3.3.2 → sigma_terminal-3.4.1}/.github/workflows/release.yml +0 -0
- {sigma_terminal-3.3.2 → sigma_terminal-3.4.1}/.gitignore +0 -0
- {sigma_terminal-3.3.2 → sigma_terminal-3.4.1}/LICENSE +0 -0
- {sigma_terminal-3.3.2 → sigma_terminal-3.4.1}/sigma/__main__.py +0 -0
- {sigma_terminal-3.3.2 → sigma_terminal-3.4.1}/sigma/analytics/__init__.py +0 -0
- {sigma_terminal-3.3.2 → sigma_terminal-3.4.1}/sigma/backtest.py +0 -0
- {sigma_terminal-3.3.2 → sigma_terminal-3.4.1}/sigma/comparison.py +0 -0
- {sigma_terminal-3.3.2 → sigma_terminal-3.4.1}/sigma/core/__init__.py +0 -0
- {sigma_terminal-3.3.2 → sigma_terminal-3.4.1}/sigma/core/engine.py +0 -0
- {sigma_terminal-3.3.2 → sigma_terminal-3.4.1}/sigma/core/intent.py +0 -0
- {sigma_terminal-3.3.2 → sigma_terminal-3.4.1}/sigma/core/models.py +0 -0
- {sigma_terminal-3.3.2 → sigma_terminal-3.4.1}/sigma/data/__init__.py +0 -0
- {sigma_terminal-3.3.2 → sigma_terminal-3.4.1}/sigma/data/models.py +0 -0
- {sigma_terminal-3.3.2 → sigma_terminal-3.4.1}/sigma/monitoring.py +0 -0
- {sigma_terminal-3.3.2 → sigma_terminal-3.4.1}/sigma/portfolio.py +0 -0
- {sigma_terminal-3.3.2 → sigma_terminal-3.4.1}/sigma/reporting.py +0 -0
- {sigma_terminal-3.3.2 → sigma_terminal-3.4.1}/sigma/robustness.py +0 -0
- {sigma_terminal-3.3.2 → sigma_terminal-3.4.1}/sigma/strategy.py +0 -0
- {sigma_terminal-3.3.2 → sigma_terminal-3.4.1}/sigma/tools/backtest.py +0 -0
- {sigma_terminal-3.3.2 → sigma_terminal-3.4.1}/sigma/visualization.py +0 -0
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: sigma-terminal
|
|
3
|
+
Version: 3.4.1
|
|
4
|
+
Summary: Sigma - Finance Research Agent
|
|
5
|
+
Project-URL: Homepage, https://github.com/desenyon/sigma
|
|
6
|
+
Project-URL: Documentation, https://github.com/desenyon/sigma/wiki
|
|
7
|
+
Project-URL: Repository, https://github.com/desenyon/sigma
|
|
8
|
+
Author: Sigma Team
|
|
9
|
+
License: Proprietary
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Keywords: ai,analytics,backtesting,finance,investment,portfolio,quantitative,research,stocks,terminal,trading
|
|
12
|
+
Classifier: Development Status :: 4 - Beta
|
|
13
|
+
Classifier: Environment :: Console
|
|
14
|
+
Classifier: Intended Audience :: Financial and Insurance Industry
|
|
15
|
+
Classifier: License :: Other/Proprietary License
|
|
16
|
+
Classifier: Operating System :: OS Independent
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Classifier: Topic :: Office/Business :: Financial :: Investment
|
|
20
|
+
Requires-Python: >=3.11
|
|
21
|
+
Requires-Dist: aiohttp>=3.9.0
|
|
22
|
+
Requires-Dist: anthropic>=0.18.0
|
|
23
|
+
Requires-Dist: google-genai>=1.0.0
|
|
24
|
+
Requires-Dist: groq>=0.4.0
|
|
25
|
+
Requires-Dist: httpx>=0.26.0
|
|
26
|
+
Requires-Dist: kaleido>=0.2.1
|
|
27
|
+
Requires-Dist: numpy>=1.26.0
|
|
28
|
+
Requires-Dist: openai>=1.12.0
|
|
29
|
+
Requires-Dist: pandas>=2.2.0
|
|
30
|
+
Requires-Dist: pillow>=10.2.0
|
|
31
|
+
Requires-Dist: plotext>=5.2.8
|
|
32
|
+
Requires-Dist: plotly>=5.18.0
|
|
33
|
+
Requires-Dist: pydantic-settings>=2.1.0
|
|
34
|
+
Requires-Dist: pydantic>=2.6.0
|
|
35
|
+
Requires-Dist: pyobjc-framework-cocoa>=10.0; sys_platform == 'darwin'
|
|
36
|
+
Requires-Dist: python-dotenv>=1.0.0
|
|
37
|
+
Requires-Dist: requests>=2.31.0
|
|
38
|
+
Requires-Dist: rich>=13.7.0
|
|
39
|
+
Requires-Dist: scipy>=1.12.0
|
|
40
|
+
Requires-Dist: textual>=0.47.0
|
|
41
|
+
Requires-Dist: yfinance>=0.2.36
|
|
42
|
+
Provides-Extra: all
|
|
43
|
+
Requires-Dist: black>=24.0.0; extra == 'all'
|
|
44
|
+
Requires-Dist: lean>=1.0.0; extra == 'all'
|
|
45
|
+
Requires-Dist: mypy>=1.8.0; extra == 'all'
|
|
46
|
+
Requires-Dist: py2app>=0.28.0; extra == 'all'
|
|
47
|
+
Requires-Dist: pytest-asyncio>=0.23.0; extra == 'all'
|
|
48
|
+
Requires-Dist: pytest>=8.0.0; extra == 'all'
|
|
49
|
+
Requires-Dist: ruff>=0.2.0; extra == 'all'
|
|
50
|
+
Provides-Extra: dev
|
|
51
|
+
Requires-Dist: black>=24.0.0; extra == 'dev'
|
|
52
|
+
Requires-Dist: mypy>=1.8.0; extra == 'dev'
|
|
53
|
+
Requires-Dist: py2app>=0.28.0; extra == 'dev'
|
|
54
|
+
Requires-Dist: pytest-asyncio>=0.23.0; extra == 'dev'
|
|
55
|
+
Requires-Dist: pytest>=8.0.0; extra == 'dev'
|
|
56
|
+
Requires-Dist: ruff>=0.2.0; extra == 'dev'
|
|
57
|
+
Provides-Extra: lean
|
|
58
|
+
Requires-Dist: lean>=1.0.0; extra == 'lean'
|
|
59
|
+
Description-Content-Type: text/markdown
|
|
60
|
+
|
|
61
|
+
<h1 align="center">
|
|
62
|
+
<code>σ</code> SIGMA
|
|
63
|
+
</h1>
|
|
64
|
+
|
|
65
|
+
<p align="center">
|
|
66
|
+
<strong>The AI-Powered Finance Research Agent</strong>
|
|
67
|
+
</p>
|
|
68
|
+
|
|
69
|
+
<p align="center">
|
|
70
|
+
<a href="#quick-start">Quick Start</a> •
|
|
71
|
+
<a href="#features">Features</a> •
|
|
72
|
+
<a href="#commands">Commands</a> •
|
|
73
|
+
<a href="#architecture">Architecture</a> •
|
|
74
|
+
<a href="#roadmap">Roadmap</a>
|
|
75
|
+
</p>
|
|
76
|
+
|
|
77
|
+
<p align="center">
|
|
78
|
+
<img src="https://img.shields.io/badge/version-3.4.1-blue.svg" alt="Version 3.4.1"/>
|
|
79
|
+
<img src="https://img.shields.io/badge/python-3.11+-green.svg" alt="Python 3.11+"/>
|
|
80
|
+
<img src="https://img.shields.io/badge/platform-cross--platform-lightgrey.svg" alt="Cross Platform"/>
|
|
81
|
+
<img src="https://img.shields.io/badge/AI-Multi--Provider-purple.svg" alt="Multi-Provider AI"/>
|
|
82
|
+
<img src="https://img.shields.io/badge/license-Proprietary-red.svg" alt="License"/>
|
|
83
|
+
</p>
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
## What is Sigma?
|
|
88
|
+
|
|
89
|
+
**Sigma isn't just another finance app.** It's a conversational AI agent that thinks like a quant, analyzes like a hedge fund, and speaks like your smartest friend who happens to be a CFA.
|
|
90
|
+
|
|
91
|
+
## Quick Start
|
|
92
|
+
|
|
93
|
+
### One Command Install
|
|
94
|
+
|
|
95
|
+
\`\`\`bash
|
|
96
|
+
pip install sigma-terminal
|
|
97
|
+
\`\`\`
|
|
98
|
+
|
|
99
|
+
### Launch Sigma
|
|
100
|
+
|
|
101
|
+
\`\`\`bash
|
|
102
|
+
sigma
|
|
103
|
+
\`\`\`
|
|
104
|
+
|
|
105
|
+
Or alternatively: `python -m sigma`
|
|
106
|
+
|
|
107
|
+
### First Launch = Automatic Setup
|
|
108
|
+
|
|
109
|
+
**That's it.** Sigma detects it's your first time and walks you through:
|
|
110
|
+
|
|
111
|
+
1. **Choose AI Provider** — Google Gemini, OpenAI, Anthropic, Groq, xAI, or Ollama
|
|
112
|
+
2. **Enter API Key** — Or use local Ollama (completely free, no key needed!)
|
|
113
|
+
3. **Auto-detect Integrations** — Finds Ollama, LEAN, and more
|
|
114
|
+
4. **Launch Directly** — Straight into the beautiful terminal UI
|
|
115
|
+
|
|
116
|
+
Your config persists at \`~/.sigma/\` — **setup never asks again**.
|
|
117
|
+
|
|
118
|
+
---
|
|
119
|
+
|
|
120
|
+
## Features
|
|
121
|
+
|
|
122
|
+
### Multi-Provider AI Engine
|
|
123
|
+
|
|
124
|
+
Switch between providers on the fly. Use free tiers or bring your own keys.
|
|
125
|
+
|
|
126
|
+
| Provider | Models | Speed | Cost | Tool Calls |
|
|
127
|
+
| ----------------------- | ---------------------------- | --------- | -------------- | ---------- |
|
|
128
|
+
| **Google Gemini** | gemini-2.5-flash, 2.5-pro | Fast | Free tier | Native |
|
|
129
|
+
| **OpenAI** | gpt-4o, gpt-4o-mini, o3-mini | Fast | Paid | Native |
|
|
130
|
+
| **Anthropic** | claude-sonnet-4, 3.5-sonnet | Fast | Paid | Native |
|
|
131
|
+
| **Groq** | llama-3.3-70b | Very Fast | Free tier | Native |
|
|
132
|
+
| **xAI** | grok-2, grok-2-mini | Fast | Paid | Native |
|
|
133
|
+
| **Ollama** | llama3.2, mistral, phi3 | Local | **FREE** | Native |
|
|
134
|
+
|
|
135
|
+
**Built-in Rate Limiting** — No more API flooding or timeouts.
|
|
136
|
+
|
|
137
|
+
**Error Codes** — Clear error codes (E1100-E1400) help you quickly diagnose issues.
|
|
138
|
+
|
|
139
|
+
### Real-Time Market Intelligence
|
|
140
|
+
|
|
141
|
+
| Tool | What It Does |
|
|
142
|
+
| ------------------------------- | --------------------------------------------- |
|
|
143
|
+
| \`get_stock_quote\` | Live price, change, volume, market cap |
|
|
144
|
+
| \`technical_analysis\` | RSI, MACD, Bollinger, MAs, Support/Resistance |
|
|
145
|
+
| \`get_financial_statements\` | Income, balance sheet, cash flow |
|
|
146
|
+
| \`get_analyst_recommendations\` | Price targets, ratings, consensus |
|
|
147
|
+
| \`get_insider_trades\` | Who's buying, who's selling |
|
|
148
|
+
| \`get_institutional_holders\` | Track the smart money |
|
|
149
|
+
| \`compare_stocks\` | Multi-stock comparison with metrics |
|
|
150
|
+
| \`get_market_overview\` | Major indices at a glance |
|
|
151
|
+
| \`get_sector_performance\` | Sector rotation analysis |
|
|
152
|
+
|
|
153
|
+
### Data APIs
|
|
154
|
+
|
|
155
|
+
| Tool | Source | What It Does |
|
|
156
|
+
| --------------------------- | ------------- | ------------------------------------ |
|
|
157
|
+
| \`get_economic_indicators\` | Alpha Vantage | GDP, inflation, unemployment, CPI |
|
|
158
|
+
| \`get_intraday_data\` | Alpha Vantage | 1min to 60min candles |
|
|
159
|
+
| \`get_market_news\` | Alpha Vantage | News with sentiment analysis |
|
|
160
|
+
| \`polygon_get_quote\` | Polygon.io | Real-time quotes with extended data |
|
|
161
|
+
| \`polygon_get_aggregates\` | Polygon.io | Historical bars with custom timespan |
|
|
162
|
+
| \`polygon_get_ticker_news\` | Polygon.io | News articles for specific tickers |
|
|
163
|
+
| \`search_financial_news\` | Exa | Search Bloomberg, Reuters, WSJ |
|
|
164
|
+
| \`search_sec_filings\` | Exa | 10-K, 10-Q, 8-K filings |
|
|
165
|
+
|
|
166
|
+
### Backtesting Engine
|
|
167
|
+
|
|
168
|
+
| Strategy | Description | Use Case |
|
|
169
|
+
| ----------------- | ----------------------- | ------------------ |
|
|
170
|
+
| \`sma_crossover\` | 20/50 MA crossover | Trend following |
|
|
171
|
+
| \`rsi\` | RSI oversold/overbought | Mean reversion |
|
|
172
|
+
| \`macd\` | MACD signal crossovers | Momentum |
|
|
173
|
+
| \`bollinger\` | Band breakout/bounce | Volatility |
|
|
174
|
+
| \`momentum\` | Price momentum | Trend continuation |
|
|
175
|
+
| \`breakout\` | S/R level breaks | Breakout trading |
|
|
176
|
+
|
|
177
|
+
---
|
|
178
|
+
|
|
179
|
+
## Commands
|
|
180
|
+
|
|
181
|
+
### In-App Commands
|
|
182
|
+
|
|
183
|
+
| Command | Description |
|
|
184
|
+
| --------------------------- | -------------------------------- |
|
|
185
|
+
| \`/help\` | Comprehensive help with examples |
|
|
186
|
+
| \`/clear\` | Clear chat history |
|
|
187
|
+
| \`/keys\` | Configure API keys (improved!) |
|
|
188
|
+
| \`/models\` | Show available models |
|
|
189
|
+
| \`/status\` | Current configuration |
|
|
190
|
+
| \`/provider `<name>`\` | Switch AI provider |
|
|
191
|
+
| \`/model `<name>`\` | Switch model |
|
|
192
|
+
| \`/setkey `<p>` `<k>`\` | Set API key for provider |
|
|
193
|
+
| \`/backtest\` | Show backtesting strategies |
|
|
194
|
+
|
|
195
|
+
### Keyboard Shortcuts
|
|
196
|
+
|
|
197
|
+
| Shortcut | Action |
|
|
198
|
+
| ---------- | ----------------------- |
|
|
199
|
+
| \`Tab\` | Autocomplete suggestion |
|
|
200
|
+
| \`Ctrl+L\` | Clear chat |
|
|
201
|
+
| \`Ctrl+M\` | Show models |
|
|
202
|
+
| \`Ctrl+H\` | Toggle quick help |
|
|
203
|
+
| \`Esc\` | Cancel operation |
|
|
204
|
+
|
|
205
|
+
---
|
|
206
|
+
|
|
207
|
+
## Configuration
|
|
208
|
+
|
|
209
|
+
### Config Location
|
|
210
|
+
|
|
211
|
+
\`\`\`
|
|
212
|
+
~/.sigma/
|
|
213
|
+
|-- config.env # API keys and settings
|
|
214
|
+
└── .first_run_complete # First-run marker
|
|
215
|
+
\`\`\`
|
|
216
|
+
|
|
217
|
+
### Error Codes
|
|
218
|
+
|
|
219
|
+
| Code Range | Category | Example |
|
|
220
|
+
| ---------- | -------- | ----------------------- |
|
|
221
|
+
| E1000-1099 | General | E1002: Timeout |
|
|
222
|
+
| E1100-1199 | API Keys | E1101: Invalid API key |
|
|
223
|
+
| E1200-1299 | Provider | E1202: Model not found |
|
|
224
|
+
| E1300-1399 | Data | E1300: Symbol not found |
|
|
225
|
+
| E1400-1499 | Network | E1400: Connection error |
|
|
226
|
+
|
|
227
|
+
---
|
|
228
|
+
|
|
229
|
+
## Changelog
|
|
230
|
+
|
|
231
|
+
### v3.4.1 (Current)
|
|
232
|
+
|
|
233
|
+
- [X] **Color-Coded Returns** — Green/red highlighting for gains/losses
|
|
234
|
+
- [X] **6 New Analysis Tools** — Valuation, risk, earnings, dividends, options, peer comparison
|
|
235
|
+
- [X] **Revamped Help Section** — Beautiful organized /help with 29 tools
|
|
236
|
+
- [X] **ASCII Spinner** — Clean terminal-friendly animation
|
|
237
|
+
- [X] **No Emojis** — Professional text-only interface
|
|
238
|
+
|
|
239
|
+
### v3.4.0
|
|
240
|
+
|
|
241
|
+
- [X] **Improved API Key Management** — Beautiful \`/keys\` interface with URLs
|
|
242
|
+
- [X] **Polygon.io Integration** — Real-time quotes, aggregates, news
|
|
243
|
+
- [X] **xAI Grok Support** — Full support for Grok-2 and Grok-2-mini
|
|
244
|
+
- [X] **Error Codes** — Structured error codes (E1000-E1499)
|
|
245
|
+
- [X] **Updated Models** — Removed deprecated, added latest versions
|
|
246
|
+
- [X] **Enhanced AI** — Maximum helpfulness with proactive insights
|
|
247
|
+
- [X] **Modern UI** — Gradient blues, improved styling
|
|
248
|
+
- [X] **Cross-Platform** — Works on macOS, Linux, Windows
|
|
249
|
+
|
|
250
|
+
### v3.3.x
|
|
251
|
+
|
|
252
|
+
- [X] Auto-setup on first launch
|
|
253
|
+
- [X] LEAN auto-detection
|
|
254
|
+
- [X] API rate limiting
|
|
255
|
+
- [X] Ollama native tool calls
|
|
256
|
+
- [X] Alpha Vantage & Exa integration
|
|
257
|
+
|
|
258
|
+
---
|
|
259
|
+
|
|
260
|
+
## Acknowledgments
|
|
261
|
+
|
|
262
|
+
Built with [Textual](https://textual.textualize.io/), [Rich](https://rich.readthedocs.io/), [yfinance](https://github.com/ranaroussi/yfinance), [Plotly](https://plotly.com/python/), LEAN
|
|
263
|
+
|
|
264
|
+
AI: [Google Gemini](https://ai.google.dev/) • [OpenAI](https://openai.com/) • [Anthropic](https://anthropic.com/) • [Groq](https://groq.com/) • [xAI](https://x.ai/) • [Ollama](https://ollama.ai/)
|
|
265
|
+
|
|
266
|
+
Data: [Polygon.io](https://polygon.io/) • [Alpha Vantage](https://www.alphavantage.co/) • [Exa](https://exa.ai/)
|
|
267
|
+
|
|
268
|
+
---
|
|
269
|
+
|
|
270
|
+
<p align="center">
|
|
271
|
+
<code>σ</code> — Finance Research AI Agent
|
|
272
|
+
</p>
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
<h1 align="center">
|
|
2
|
+
<code>σ</code> SIGMA
|
|
3
|
+
</h1>
|
|
4
|
+
|
|
5
|
+
<p align="center">
|
|
6
|
+
<strong>The AI-Powered Finance Research Agent</strong>
|
|
7
|
+
</p>
|
|
8
|
+
|
|
9
|
+
<p align="center">
|
|
10
|
+
<a href="#quick-start">Quick Start</a> •
|
|
11
|
+
<a href="#features">Features</a> •
|
|
12
|
+
<a href="#commands">Commands</a> •
|
|
13
|
+
<a href="#architecture">Architecture</a> •
|
|
14
|
+
<a href="#roadmap">Roadmap</a>
|
|
15
|
+
</p>
|
|
16
|
+
|
|
17
|
+
<p align="center">
|
|
18
|
+
<img src="https://img.shields.io/badge/version-3.4.1-blue.svg" alt="Version 3.4.1"/>
|
|
19
|
+
<img src="https://img.shields.io/badge/python-3.11+-green.svg" alt="Python 3.11+"/>
|
|
20
|
+
<img src="https://img.shields.io/badge/platform-cross--platform-lightgrey.svg" alt="Cross Platform"/>
|
|
21
|
+
<img src="https://img.shields.io/badge/AI-Multi--Provider-purple.svg" alt="Multi-Provider AI"/>
|
|
22
|
+
<img src="https://img.shields.io/badge/license-Proprietary-red.svg" alt="License"/>
|
|
23
|
+
</p>
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## What is Sigma?
|
|
28
|
+
|
|
29
|
+
**Sigma isn't just another finance app.** It's a conversational AI agent that thinks like a quant, analyzes like a hedge fund, and speaks like your smartest friend who happens to be a CFA.
|
|
30
|
+
|
|
31
|
+
## Quick Start
|
|
32
|
+
|
|
33
|
+
### One Command Install
|
|
34
|
+
|
|
35
|
+
\`\`\`bash
|
|
36
|
+
pip install sigma-terminal
|
|
37
|
+
\`\`\`
|
|
38
|
+
|
|
39
|
+
### Launch Sigma
|
|
40
|
+
|
|
41
|
+
\`\`\`bash
|
|
42
|
+
sigma
|
|
43
|
+
\`\`\`
|
|
44
|
+
|
|
45
|
+
Or alternatively: `python -m sigma`
|
|
46
|
+
|
|
47
|
+
### First Launch = Automatic Setup
|
|
48
|
+
|
|
49
|
+
**That's it.** Sigma detects it's your first time and walks you through:
|
|
50
|
+
|
|
51
|
+
1. **Choose AI Provider** — Google Gemini, OpenAI, Anthropic, Groq, xAI, or Ollama
|
|
52
|
+
2. **Enter API Key** — Or use local Ollama (completely free, no key needed!)
|
|
53
|
+
3. **Auto-detect Integrations** — Finds Ollama, LEAN, and more
|
|
54
|
+
4. **Launch Directly** — Straight into the beautiful terminal UI
|
|
55
|
+
|
|
56
|
+
Your config persists at \`~/.sigma/\` — **setup never asks again**.
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
## Features
|
|
61
|
+
|
|
62
|
+
### Multi-Provider AI Engine
|
|
63
|
+
|
|
64
|
+
Switch between providers on the fly. Use free tiers or bring your own keys.
|
|
65
|
+
|
|
66
|
+
| Provider | Models | Speed | Cost | Tool Calls |
|
|
67
|
+
| ----------------------- | ---------------------------- | --------- | -------------- | ---------- |
|
|
68
|
+
| **Google Gemini** | gemini-2.5-flash, 2.5-pro | Fast | Free tier | Native |
|
|
69
|
+
| **OpenAI** | gpt-4o, gpt-4o-mini, o3-mini | Fast | Paid | Native |
|
|
70
|
+
| **Anthropic** | claude-sonnet-4, 3.5-sonnet | Fast | Paid | Native |
|
|
71
|
+
| **Groq** | llama-3.3-70b | Very Fast | Free tier | Native |
|
|
72
|
+
| **xAI** | grok-2, grok-2-mini | Fast | Paid | Native |
|
|
73
|
+
| **Ollama** | llama3.2, mistral, phi3 | Local | **FREE** | Native |
|
|
74
|
+
|
|
75
|
+
**Built-in Rate Limiting** — No more API flooding or timeouts.
|
|
76
|
+
|
|
77
|
+
**Error Codes** — Clear error codes (E1100-E1400) help you quickly diagnose issues.
|
|
78
|
+
|
|
79
|
+
### Real-Time Market Intelligence
|
|
80
|
+
|
|
81
|
+
| Tool | What It Does |
|
|
82
|
+
| ------------------------------- | --------------------------------------------- |
|
|
83
|
+
| \`get_stock_quote\` | Live price, change, volume, market cap |
|
|
84
|
+
| \`technical_analysis\` | RSI, MACD, Bollinger, MAs, Support/Resistance |
|
|
85
|
+
| \`get_financial_statements\` | Income, balance sheet, cash flow |
|
|
86
|
+
| \`get_analyst_recommendations\` | Price targets, ratings, consensus |
|
|
87
|
+
| \`get_insider_trades\` | Who's buying, who's selling |
|
|
88
|
+
| \`get_institutional_holders\` | Track the smart money |
|
|
89
|
+
| \`compare_stocks\` | Multi-stock comparison with metrics |
|
|
90
|
+
| \`get_market_overview\` | Major indices at a glance |
|
|
91
|
+
| \`get_sector_performance\` | Sector rotation analysis |
|
|
92
|
+
|
|
93
|
+
### Data APIs
|
|
94
|
+
|
|
95
|
+
| Tool | Source | What It Does |
|
|
96
|
+
| --------------------------- | ------------- | ------------------------------------ |
|
|
97
|
+
| \`get_economic_indicators\` | Alpha Vantage | GDP, inflation, unemployment, CPI |
|
|
98
|
+
| \`get_intraday_data\` | Alpha Vantage | 1min to 60min candles |
|
|
99
|
+
| \`get_market_news\` | Alpha Vantage | News with sentiment analysis |
|
|
100
|
+
| \`polygon_get_quote\` | Polygon.io | Real-time quotes with extended data |
|
|
101
|
+
| \`polygon_get_aggregates\` | Polygon.io | Historical bars with custom timespan |
|
|
102
|
+
| \`polygon_get_ticker_news\` | Polygon.io | News articles for specific tickers |
|
|
103
|
+
| \`search_financial_news\` | Exa | Search Bloomberg, Reuters, WSJ |
|
|
104
|
+
| \`search_sec_filings\` | Exa | 10-K, 10-Q, 8-K filings |
|
|
105
|
+
|
|
106
|
+
### Backtesting Engine
|
|
107
|
+
|
|
108
|
+
| Strategy | Description | Use Case |
|
|
109
|
+
| ----------------- | ----------------------- | ------------------ |
|
|
110
|
+
| \`sma_crossover\` | 20/50 MA crossover | Trend following |
|
|
111
|
+
| \`rsi\` | RSI oversold/overbought | Mean reversion |
|
|
112
|
+
| \`macd\` | MACD signal crossovers | Momentum |
|
|
113
|
+
| \`bollinger\` | Band breakout/bounce | Volatility |
|
|
114
|
+
| \`momentum\` | Price momentum | Trend continuation |
|
|
115
|
+
| \`breakout\` | S/R level breaks | Breakout trading |
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
## Commands
|
|
120
|
+
|
|
121
|
+
### In-App Commands
|
|
122
|
+
|
|
123
|
+
| Command | Description |
|
|
124
|
+
| --------------------------- | -------------------------------- |
|
|
125
|
+
| \`/help\` | Comprehensive help with examples |
|
|
126
|
+
| \`/clear\` | Clear chat history |
|
|
127
|
+
| \`/keys\` | Configure API keys (improved!) |
|
|
128
|
+
| \`/models\` | Show available models |
|
|
129
|
+
| \`/status\` | Current configuration |
|
|
130
|
+
| \`/provider `<name>`\` | Switch AI provider |
|
|
131
|
+
| \`/model `<name>`\` | Switch model |
|
|
132
|
+
| \`/setkey `<p>` `<k>`\` | Set API key for provider |
|
|
133
|
+
| \`/backtest\` | Show backtesting strategies |
|
|
134
|
+
|
|
135
|
+
### Keyboard Shortcuts
|
|
136
|
+
|
|
137
|
+
| Shortcut | Action |
|
|
138
|
+
| ---------- | ----------------------- |
|
|
139
|
+
| \`Tab\` | Autocomplete suggestion |
|
|
140
|
+
| \`Ctrl+L\` | Clear chat |
|
|
141
|
+
| \`Ctrl+M\` | Show models |
|
|
142
|
+
| \`Ctrl+H\` | Toggle quick help |
|
|
143
|
+
| \`Esc\` | Cancel operation |
|
|
144
|
+
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
## Configuration
|
|
148
|
+
|
|
149
|
+
### Config Location
|
|
150
|
+
|
|
151
|
+
\`\`\`
|
|
152
|
+
~/.sigma/
|
|
153
|
+
|-- config.env # API keys and settings
|
|
154
|
+
└── .first_run_complete # First-run marker
|
|
155
|
+
\`\`\`
|
|
156
|
+
|
|
157
|
+
### Error Codes
|
|
158
|
+
|
|
159
|
+
| Code Range | Category | Example |
|
|
160
|
+
| ---------- | -------- | ----------------------- |
|
|
161
|
+
| E1000-1099 | General | E1002: Timeout |
|
|
162
|
+
| E1100-1199 | API Keys | E1101: Invalid API key |
|
|
163
|
+
| E1200-1299 | Provider | E1202: Model not found |
|
|
164
|
+
| E1300-1399 | Data | E1300: Symbol not found |
|
|
165
|
+
| E1400-1499 | Network | E1400: Connection error |
|
|
166
|
+
|
|
167
|
+
---
|
|
168
|
+
|
|
169
|
+
## Changelog
|
|
170
|
+
|
|
171
|
+
### v3.4.1 (Current)
|
|
172
|
+
|
|
173
|
+
- [X] **Color-Coded Returns** — Green/red highlighting for gains/losses
|
|
174
|
+
- [X] **6 New Analysis Tools** — Valuation, risk, earnings, dividends, options, peer comparison
|
|
175
|
+
- [X] **Revamped Help Section** — Beautiful organized /help with 29 tools
|
|
176
|
+
- [X] **ASCII Spinner** — Clean terminal-friendly animation
|
|
177
|
+
- [X] **No Emojis** — Professional text-only interface
|
|
178
|
+
|
|
179
|
+
### v3.4.0
|
|
180
|
+
|
|
181
|
+
- [X] **Improved API Key Management** — Beautiful \`/keys\` interface with URLs
|
|
182
|
+
- [X] **Polygon.io Integration** — Real-time quotes, aggregates, news
|
|
183
|
+
- [X] **xAI Grok Support** — Full support for Grok-2 and Grok-2-mini
|
|
184
|
+
- [X] **Error Codes** — Structured error codes (E1000-E1499)
|
|
185
|
+
- [X] **Updated Models** — Removed deprecated, added latest versions
|
|
186
|
+
- [X] **Enhanced AI** — Maximum helpfulness with proactive insights
|
|
187
|
+
- [X] **Modern UI** — Gradient blues, improved styling
|
|
188
|
+
- [X] **Cross-Platform** — Works on macOS, Linux, Windows
|
|
189
|
+
|
|
190
|
+
### v3.3.x
|
|
191
|
+
|
|
192
|
+
- [X] Auto-setup on first launch
|
|
193
|
+
- [X] LEAN auto-detection
|
|
194
|
+
- [X] API rate limiting
|
|
195
|
+
- [X] Ollama native tool calls
|
|
196
|
+
- [X] Alpha Vantage & Exa integration
|
|
197
|
+
|
|
198
|
+
---
|
|
199
|
+
|
|
200
|
+
## Acknowledgments
|
|
201
|
+
|
|
202
|
+
Built with [Textual](https://textual.textualize.io/), [Rich](https://rich.readthedocs.io/), [yfinance](https://github.com/ranaroussi/yfinance), [Plotly](https://plotly.com/python/), LEAN
|
|
203
|
+
|
|
204
|
+
AI: [Google Gemini](https://ai.google.dev/) • [OpenAI](https://openai.com/) • [Anthropic](https://anthropic.com/) • [Groq](https://groq.com/) • [xAI](https://x.ai/) • [Ollama](https://ollama.ai/)
|
|
205
|
+
|
|
206
|
+
Data: [Polygon.io](https://polygon.io/) • [Alpha Vantage](https://www.alphavantage.co/) • [Exa](https://exa.ai/)
|
|
207
|
+
|
|
208
|
+
---
|
|
209
|
+
|
|
210
|
+
<p align="center">
|
|
211
|
+
<code>σ</code> — Finance Research AI Agent
|
|
212
|
+
</p>
|
|
@@ -4,22 +4,22 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "sigma-terminal"
|
|
7
|
-
version = "3.
|
|
7
|
+
version = "3.4.1"
|
|
8
8
|
description = "Sigma - Finance Research Agent"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = {text = "Proprietary"}
|
|
11
11
|
authors = [{ name = "Sigma Team" }]
|
|
12
12
|
requires-python = ">=3.11"
|
|
13
13
|
keywords = [
|
|
14
|
-
"finance", "ai", "trading", "research", "terminal", "stocks",
|
|
14
|
+
"finance", "ai", "trading", "research", "terminal", "stocks",
|
|
15
15
|
"portfolio", "analytics", "backtesting", "quantitative", "investment"
|
|
16
16
|
]
|
|
17
17
|
classifiers = [
|
|
18
18
|
"Development Status :: 4 - Beta",
|
|
19
|
-
"Environment ::
|
|
19
|
+
"Environment :: Console",
|
|
20
20
|
"Intended Audience :: Financial and Insurance Industry",
|
|
21
21
|
"License :: Other/Proprietary License",
|
|
22
|
-
"Operating System ::
|
|
22
|
+
"Operating System :: OS Independent",
|
|
23
23
|
"Programming Language :: Python :: 3.11",
|
|
24
24
|
"Programming Language :: Python :: 3.12",
|
|
25
25
|
"Topic :: Office/Business :: Financial :: Investment",
|
|
@@ -7,7 +7,7 @@ SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
|
7
7
|
PROJECT_DIR="$( cd "$SCRIPT_DIR/.." && pwd )"
|
|
8
8
|
|
|
9
9
|
echo "========================================"
|
|
10
|
-
echo " Sigma v3.
|
|
10
|
+
echo " Sigma v3.4.1 Build Script"
|
|
11
11
|
echo "========================================"
|
|
12
12
|
echo ""
|
|
13
13
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"""
|
|
2
|
-
Sigma v3.
|
|
2
|
+
Sigma v3.4.1 - Finance Research Agent
|
|
3
3
|
|
|
4
4
|
An elite finance research agent combining:
|
|
5
5
|
- Multi-provider AI (Google Gemini, OpenAI, Anthropic, Groq, xAI, Ollama)
|
|
6
|
-
- Real-time market data and analytics
|
|
6
|
+
- Real-time market data and analytics (yfinance, Polygon.io)
|
|
7
7
|
- Advanced charting and visualization
|
|
8
8
|
- Strategy discovery and backtesting
|
|
9
9
|
- Portfolio optimization and risk management
|
|
@@ -12,15 +12,15 @@ An elite finance research agent combining:
|
|
|
12
12
|
- Monitoring, alerts, and watchlists
|
|
13
13
|
"""
|
|
14
14
|
|
|
15
|
-
__version__ = "3.
|
|
15
|
+
__version__ = "3.4.1"
|
|
16
16
|
__author__ = "Sigma Team"
|
|
17
17
|
|
|
18
18
|
# Core functionality
|
|
19
19
|
from .app import launch, SigmaApp
|
|
20
20
|
from .cli import main
|
|
21
21
|
|
|
22
|
-
# Configuration
|
|
23
|
-
from .config import get_settings, save_api_key, LLMProvider
|
|
22
|
+
# Configuration and Errors
|
|
23
|
+
from .config import get_settings, save_api_key, LLMProvider, ErrorCode, SigmaError
|
|
24
24
|
|
|
25
25
|
# Data tools
|
|
26
26
|
from .tools import (
|