sigma-terminal 3.3.0__py3-none-any.whl → 3.3.1__py3-none-any.whl
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/__init__.py +2 -2
- sigma/app.py +3 -3
- sigma/cli.py +5 -4
- sigma/config.py +4 -4
- sigma/setup.py +17 -3
- sigma/tools.py +431 -5
- sigma_terminal-3.3.1.dist-info/METADATA +444 -0
- {sigma_terminal-3.3.0.dist-info → sigma_terminal-3.3.1.dist-info}/RECORD +11 -11
- sigma_terminal-3.3.0.dist-info/METADATA +0 -583
- {sigma_terminal-3.3.0.dist-info → sigma_terminal-3.3.1.dist-info}/WHEEL +0 -0
- {sigma_terminal-3.3.0.dist-info → sigma_terminal-3.3.1.dist-info}/entry_points.txt +0 -0
- {sigma_terminal-3.3.0.dist-info → sigma_terminal-3.3.1.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,583 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: sigma-terminal
|
|
3
|
-
Version: 3.3.0
|
|
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,macos,portfolio,quantitative,research,stocks,terminal,trading
|
|
12
|
-
Classifier: Development Status :: 4 - Beta
|
|
13
|
-
Classifier: Environment :: MacOS X
|
|
14
|
-
Classifier: Intended Audience :: Financial and Insurance Industry
|
|
15
|
-
Classifier: License :: Other/Proprietary License
|
|
16
|
-
Classifier: Operating System :: MacOS
|
|
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
|
-
<p align="center">
|
|
62
|
-
<img src="https://img.shields.io/badge/σ-SIGMA-blue?style=for-the-badge&labelColor=0a0a0f&color=3b82f6" alt="Sigma" height="60"/>
|
|
63
|
-
</p>
|
|
64
|
-
|
|
65
|
-
<h1 align="center">
|
|
66
|
-
<code>σ</code> SIGMA
|
|
67
|
-
</h1>
|
|
68
|
-
|
|
69
|
-
<p align="center">
|
|
70
|
-
<strong>The AI-Powered Finance Research Agent That Actually Gets It Done</strong>
|
|
71
|
-
</p>
|
|
72
|
-
|
|
73
|
-
<p align="center">
|
|
74
|
-
<a href="#-quick-start">Quick Start</a> •
|
|
75
|
-
<a href="#-features">Features</a> •
|
|
76
|
-
<a href="#-commands">Commands</a> •
|
|
77
|
-
<a href="#-architecture">Architecture</a> •
|
|
78
|
-
<a href="#-roadmap">Roadmap</a>
|
|
79
|
-
</p>
|
|
80
|
-
|
|
81
|
-
<p align="center">
|
|
82
|
-
<img src="https://img.shields.io/badge/version-3.3.0-blue.svg" alt="Version 3.3.0"/>
|
|
83
|
-
<img src="https://img.shields.io/badge/python-3.11+-green.svg" alt="Python 3.11+"/>
|
|
84
|
-
<img src="https://img.shields.io/badge/platform-macOS-lightgrey.svg" alt="macOS"/>
|
|
85
|
-
<img src="https://img.shields.io/badge/AI-Multi--Provider-purple.svg" alt="Multi-Provider AI"/>
|
|
86
|
-
<img src="https://img.shields.io/badge/license-Proprietary-red.svg" alt="License"/>
|
|
87
|
-
</p>
|
|
88
|
-
|
|
89
|
-
<br/>
|
|
90
|
-
|
|
91
|
-
```
|
|
92
|
-
╔═══════════════════════════════════════════════════════════════════════════════╗
|
|
93
|
-
║ ║
|
|
94
|
-
║ ███████╗██╗ ██████╗ ███╗ ███╗ █████╗ ║
|
|
95
|
-
║ ██╔════╝██║██╔════╝ ████╗ ████║██╔══██╗ ║
|
|
96
|
-
║ ███████╗██║██║ ███╗██╔████╔██║███████║ Finance Research Agent ║
|
|
97
|
-
║ ╚════██║██║██║ ██║██║╚██╔╝██║██╔══██║ v3.3.0 | Native macOS ║
|
|
98
|
-
║ ███████║██║╚██████╔╝██║ ╚═╝ ██║██║ ██║ ║
|
|
99
|
-
║ ╚══════╝╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝ ║
|
|
100
|
-
║ ║
|
|
101
|
-
╚═══════════════════════════════════════════════════════════════════════════════╝
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
---
|
|
105
|
-
|
|
106
|
-
## 🎯 What is Sigma?
|
|
107
|
-
|
|
108
|
-
**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.
|
|
109
|
-
|
|
110
|
-
```
|
|
111
|
-
You: "Should I buy NVDA?"
|
|
112
|
-
|
|
113
|
-
σ: Let me analyze that...
|
|
114
|
-
⠋ get_stock_quote executing...
|
|
115
|
-
✓ get_stock_quote complete
|
|
116
|
-
⠹ technical_analysis executing...
|
|
117
|
-
✓ technical_analysis complete
|
|
118
|
-
⠸ get_analyst_recommendations executing...
|
|
119
|
-
✓ get_analyst_recommendations complete
|
|
120
|
-
|
|
121
|
-
┌─────────────────────────────────────────────────────────────────────┐
|
|
122
|
-
│ σ Sigma │
|
|
123
|
-
├─────────────────────────────────────────────────────────────────────┤
|
|
124
|
-
│ │
|
|
125
|
-
│ 📊 NVDA Analysis | Current: $875.32 (+2.4%) │
|
|
126
|
-
│ │
|
|
127
|
-
│ TECHNICAL SIGNALS: │
|
|
128
|
-
│ • RSI: 67.2 (approaching overbought) │
|
|
129
|
-
│ • MACD: Bullish crossover 3 days ago │
|
|
130
|
-
│ • Above 20/50/200 SMA ✓ │
|
|
131
|
-
│ │
|
|
132
|
-
│ FUNDAMENTALS: │
|
|
133
|
-
│ • P/E: 65.2 (premium to sector) │
|
|
134
|
-
│ • Revenue Growth: +122% YoY │
|
|
135
|
-
│ • AI/Data Center: 83% of revenue │
|
|
136
|
-
│ │
|
|
137
|
-
│ ANALYST CONSENSUS: Strong Buy (45 analysts) │
|
|
138
|
-
│ Price Target: $950 (median) | Range: $620-$1,200 │
|
|
139
|
-
│ │
|
|
140
|
-
│ ⚡ VERDICT: BUY on pullbacks to $820-850 support │
|
|
141
|
-
│ Risk: High volatility, valuation stretched │
|
|
142
|
-
│ │
|
|
143
|
-
└─────────────────────────────────────────────────────────────────────┘
|
|
144
|
-
```
|
|
145
|
-
|
|
146
|
-
---
|
|
147
|
-
|
|
148
|
-
## ⚡ Quick Start
|
|
149
|
-
|
|
150
|
-
### One Command Install
|
|
151
|
-
|
|
152
|
-
```bash
|
|
153
|
-
pip install sigma-terminal
|
|
154
|
-
```
|
|
155
|
-
|
|
156
|
-
### First Launch = Automatic Setup
|
|
157
|
-
|
|
158
|
-
```bash
|
|
159
|
-
sigma
|
|
160
|
-
```
|
|
161
|
-
|
|
162
|
-
**That's it.** Sigma detects it's your first time and walks you through:
|
|
163
|
-
|
|
164
|
-
1. **🤖 Choose AI Provider** — Google Gemini, OpenAI, Anthropic, Groq, xAI, or Ollama
|
|
165
|
-
2. **🔑 Enter API Key** — Or use local Ollama (completely free, no key needed!)
|
|
166
|
-
3. **🔍 Auto-detect Integrations** — Finds Ollama, LEAN, and more
|
|
167
|
-
4. **🚀 Launch Directly** — Straight into the beautiful terminal UI
|
|
168
|
-
|
|
169
|
-
Your config persists at `~/.sigma/` — **setup never asks again**.
|
|
170
|
-
|
|
171
|
-
---
|
|
172
|
-
|
|
173
|
-
## 🚀 Features
|
|
174
|
-
|
|
175
|
-
### 🤖 Multi-Provider AI Engine
|
|
176
|
-
|
|
177
|
-
Switch between providers on the fly. Use free tiers or bring your own keys.
|
|
178
|
-
|
|
179
|
-
| Provider | Models | Speed | Cost | Tool Calls |
|
|
180
|
-
|----------|--------|-------|------|------------|
|
|
181
|
-
| **Google Gemini** | gemini-2.0-flash, 1.5-pro | ⚡⚡⚡ | Free tier | ✓ Native |
|
|
182
|
-
| **OpenAI** | gpt-4o, o1-preview | ⚡⚡ | Paid | ✓ Native |
|
|
183
|
-
| **Anthropic** | claude-sonnet-4, opus | ⚡⚡ | Paid | ✓ Native |
|
|
184
|
-
| **Groq** | llama-3.3-70b | ⚡⚡⚡⚡ | Free tier | ✓ Native |
|
|
185
|
-
| **xAI** | grok-2 | ⚡⚡ | Paid | ✓ Native |
|
|
186
|
-
| **Ollama** | llama3.2, mistral, phi3 | ⚡ | **100% FREE** | ✓ Native |
|
|
187
|
-
|
|
188
|
-
**🛡️ Built-in Rate Limiting** — No more API flooding or timeouts. Sigma intelligently manages request rates per provider.
|
|
189
|
-
|
|
190
|
-
### 📊 Real-Time Market Intelligence
|
|
191
|
-
|
|
192
|
-
Every tool is a function call. The AI decides what to use.
|
|
193
|
-
|
|
194
|
-
| Tool | What It Does |
|
|
195
|
-
|------|--------------|
|
|
196
|
-
| `get_stock_quote` | Live price, change, volume, market cap |
|
|
197
|
-
| `technical_analysis` | RSI, MACD, Bollinger, MAs, Support/Resistance |
|
|
198
|
-
| `get_financial_statements` | Income, balance sheet, cash flow |
|
|
199
|
-
| `get_analyst_recommendations` | Price targets, ratings, consensus |
|
|
200
|
-
| `get_insider_trades` | Who's buying, who's selling |
|
|
201
|
-
| `get_institutional_holders` | Track the smart money |
|
|
202
|
-
| `compare_stocks` | Multi-stock comparison with metrics |
|
|
203
|
-
| `get_market_overview` | Major indices at a glance |
|
|
204
|
-
| `get_sector_performance` | Sector rotation analysis |
|
|
205
|
-
|
|
206
|
-
### 📈 Backtesting Engine
|
|
207
|
-
|
|
208
|
-
Test strategies before risking capital:
|
|
209
|
-
|
|
210
|
-
| Strategy | Description | Use Case |
|
|
211
|
-
|----------|-------------|----------|
|
|
212
|
-
| `sma_crossover` | 20/50 MA crossover | Trend following |
|
|
213
|
-
| `rsi` | RSI oversold/overbought | Mean reversion |
|
|
214
|
-
| `macd` | MACD signal crossovers | Momentum |
|
|
215
|
-
| `bollinger` | Band breakout/bounce | Volatility |
|
|
216
|
-
| `momentum` | Price momentum | Trend continuation |
|
|
217
|
-
| `breakout` | S/R level breaks | Breakout trading |
|
|
218
|
-
|
|
219
|
-
```bash
|
|
220
|
-
# Via CLI
|
|
221
|
-
sigma backtest AAPL --strategy sma_crossover --period 2y
|
|
222
|
-
|
|
223
|
-
# Via chat
|
|
224
|
-
You: "Backtest RSI strategy on SPY for the last year"
|
|
225
|
-
```
|
|
226
|
-
|
|
227
|
-
### 🔧 LEAN Integration (Auto-Detected!)
|
|
228
|
-
|
|
229
|
-
Sigma automatically finds your LEAN/QuantConnect installation:
|
|
230
|
-
|
|
231
|
-
```
|
|
232
|
-
✓ LEAN/QuantConnect detected!
|
|
233
|
-
CLI: /usr/local/bin/lean
|
|
234
|
-
Directory: /Users/you/Lean
|
|
235
|
-
|
|
236
|
-
Enable LEAN integration? [y/n] (y): y
|
|
237
|
-
σ LEAN integration enabled
|
|
238
|
-
```
|
|
239
|
-
|
|
240
|
-
**Don't have LEAN?** Sigma offers to install it for you:
|
|
241
|
-
|
|
242
|
-
```
|
|
243
|
-
! LEAN/QuantConnect not detected
|
|
244
|
-
Would you like to [install/manual/skip] (skip): install
|
|
245
|
-
|
|
246
|
-
σ Installing LEAN CLI via pip...
|
|
247
|
-
✓ LEAN CLI installed successfully!
|
|
248
|
-
```
|
|
249
|
-
|
|
250
|
-
### 🎨 Beautiful Terminal UI
|
|
251
|
-
|
|
252
|
-
- **Animated Tool Calls** — Watch `⠋ ⠙ ⠹ ⠸ ⠼ ⠴ ⠦ ⠧ ⠇ ⠏` spin as tools execute
|
|
253
|
-
- **Live Ticker Detection** — Type `AAPL` and see `$AAPL` highlighted instantly
|
|
254
|
-
- **Smart Autocomplete** — Tab to complete commands and tickers
|
|
255
|
-
- **Pulsing σ Indicator** — Subtle animation shows Sigma is thinking
|
|
256
|
-
- **Rich Responses** — Markdown tables, formatting, structure
|
|
257
|
-
|
|
258
|
-
---
|
|
259
|
-
|
|
260
|
-
## 💻 Commands
|
|
261
|
-
|
|
262
|
-
### In-App Commands
|
|
263
|
-
|
|
264
|
-
| Command | Description |
|
|
265
|
-
|---------|-------------|
|
|
266
|
-
| `/help` | Comprehensive help with examples |
|
|
267
|
-
| `/clear` | Clear chat history |
|
|
268
|
-
| `/keys` | Configure API keys |
|
|
269
|
-
| `/models` | Show available models |
|
|
270
|
-
| `/status` | Current configuration |
|
|
271
|
-
| `/provider <name>` | Switch AI provider |
|
|
272
|
-
| `/model <name>` | Switch model |
|
|
273
|
-
| `/backtest` | Show backtesting strategies |
|
|
274
|
-
| `/tickers` | Popular tickers by category |
|
|
275
|
-
|
|
276
|
-
### Keyboard Shortcuts
|
|
277
|
-
|
|
278
|
-
| Shortcut | Action |
|
|
279
|
-
|----------|--------|
|
|
280
|
-
| `Tab` | Autocomplete suggestion |
|
|
281
|
-
| `Ctrl+L` | Clear chat |
|
|
282
|
-
| `Ctrl+M` | Show models |
|
|
283
|
-
| `Ctrl+H` | Toggle quick help |
|
|
284
|
-
| `Ctrl+P` | Command palette |
|
|
285
|
-
| `Esc` | Cancel operation |
|
|
286
|
-
|
|
287
|
-
### CLI Commands
|
|
288
|
-
|
|
289
|
-
```bash
|
|
290
|
-
# Launch interactive mode
|
|
291
|
-
sigma
|
|
292
|
-
|
|
293
|
-
# Quick queries (no UI)
|
|
294
|
-
sigma ask "analyze AAPL"
|
|
295
|
-
sigma quote AAPL MSFT NVDA
|
|
296
|
-
sigma compare AAPL MSFT GOOGL
|
|
297
|
-
|
|
298
|
-
# Backtesting
|
|
299
|
-
sigma backtest AAPL --strategy sma_crossover --period 2y
|
|
300
|
-
|
|
301
|
-
# Configuration
|
|
302
|
-
sigma --setup # Re-run setup wizard
|
|
303
|
-
sigma --status # Show current config
|
|
304
|
-
sigma --setkey google YOUR_API_KEY
|
|
305
|
-
sigma --provider ollama
|
|
306
|
-
sigma --model llama3.2
|
|
307
|
-
sigma --list-models # Show all available models
|
|
308
|
-
```
|
|
309
|
-
|
|
310
|
-
---
|
|
311
|
-
|
|
312
|
-
## 🧠 Natural Language Examples
|
|
313
|
-
|
|
314
|
-
Sigma understands you. Just talk to it:
|
|
315
|
-
|
|
316
|
-
**Analysis**
|
|
317
|
-
```
|
|
318
|
-
"What's happening with AAPL today?"
|
|
319
|
-
"Give me a full breakdown of NVDA"
|
|
320
|
-
"Is TSLA overvalued right now?"
|
|
321
|
-
```
|
|
322
|
-
|
|
323
|
-
**Comparison**
|
|
324
|
-
```
|
|
325
|
-
"Compare NVDA, AMD, and INTC"
|
|
326
|
-
"Which is better: GOOGL or META?"
|
|
327
|
-
"Show me the Magnificent 7 stocks side by side"
|
|
328
|
-
```
|
|
329
|
-
|
|
330
|
-
**Technical**
|
|
331
|
-
```
|
|
332
|
-
"Technical analysis of QQQ"
|
|
333
|
-
"What are the support and resistance levels for SPY?"
|
|
334
|
-
"Is AAPL overbought?"
|
|
335
|
-
```
|
|
336
|
-
|
|
337
|
-
**Fundamentals**
|
|
338
|
-
```
|
|
339
|
-
"What's the P/E ratio of MSFT?"
|
|
340
|
-
"Show me AMZN's revenue growth"
|
|
341
|
-
"Income statement for GOOGL"
|
|
342
|
-
```
|
|
343
|
-
|
|
344
|
-
**Activity**
|
|
345
|
-
```
|
|
346
|
-
"Who are the biggest institutional holders of AAPL?"
|
|
347
|
-
"Any insider trading at TSLA?"
|
|
348
|
-
"What are analysts saying about META?"
|
|
349
|
-
```
|
|
350
|
-
|
|
351
|
-
**Market**
|
|
352
|
-
```
|
|
353
|
-
"How's the market doing?"
|
|
354
|
-
"Which sectors are hot right now?"
|
|
355
|
-
"Give me a market overview"
|
|
356
|
-
```
|
|
357
|
-
|
|
358
|
-
**Backtesting**
|
|
359
|
-
```
|
|
360
|
-
"Backtest SMA crossover on SPY"
|
|
361
|
-
"Run RSI strategy on AAPL for 2 years"
|
|
362
|
-
"Test momentum strategy on QQQ"
|
|
363
|
-
```
|
|
364
|
-
|
|
365
|
-
---
|
|
366
|
-
|
|
367
|
-
## 🏗️ Architecture
|
|
368
|
-
|
|
369
|
-
```
|
|
370
|
-
sigma/
|
|
371
|
-
├── app.py # Textual TUI application
|
|
372
|
-
│ # - ToolCallDisplay (animated spinners)
|
|
373
|
-
│ # - SigmaIndicator (pulsing σ)
|
|
374
|
-
│ # - TickerHighlight (real-time detection)
|
|
375
|
-
│ # - ChatLog (rich formatting)
|
|
376
|
-
│
|
|
377
|
-
├── cli.py # CLI entry point
|
|
378
|
-
│ # - First-run detection
|
|
379
|
-
│ # - Auto-launch setup → interactive
|
|
380
|
-
│ # - Subcommands (ask, quote, backtest)
|
|
381
|
-
│
|
|
382
|
-
├── config.py # Settings & persistence
|
|
383
|
-
│ # - detect_lean_installation()
|
|
384
|
-
│ # - detect_ollama()
|
|
385
|
-
│ # - install_lean_cli_sync()
|
|
386
|
-
│ # - ~/.sigma/config.env
|
|
387
|
-
│
|
|
388
|
-
├── setup.py # First-run setup wizard
|
|
389
|
-
│ # - Provider selection
|
|
390
|
-
│ # - API key configuration
|
|
391
|
-
│ # - Integration auto-detection
|
|
392
|
-
│ # - LEAN download option
|
|
393
|
-
│
|
|
394
|
-
├── llm.py # Multi-provider AI clients
|
|
395
|
-
│ # - RateLimiter (per-provider)
|
|
396
|
-
│ # - GoogleLLM, OpenAILLM, AnthropicLLM
|
|
397
|
-
│ # - GroqLLM, OllamaLLM (with tool calls!)
|
|
398
|
-
│
|
|
399
|
-
├── tools.py # Financial data tools
|
|
400
|
-
│ # - 11 tool functions
|
|
401
|
-
│ # - OpenAI-compatible schema
|
|
402
|
-
│ # - yfinance data source
|
|
403
|
-
│
|
|
404
|
-
├── backtest.py # Backtesting engine
|
|
405
|
-
│ # - 6 built-in strategies
|
|
406
|
-
│ # - Performance metrics
|
|
407
|
-
│ # - Risk analysis
|
|
408
|
-
│
|
|
409
|
-
└── analytics/ # Advanced analytics (v4.0)
|
|
410
|
-
```
|
|
411
|
-
|
|
412
|
-
### Key Design Decisions
|
|
413
|
-
|
|
414
|
-
| Decision | Why |
|
|
415
|
-
|----------|-----|
|
|
416
|
-
| **Provider Abstraction** | All LLMs implement `BaseLLM.generate()` — easy to add new providers |
|
|
417
|
-
| **Tool System** | OpenAI-compatible function calling works across all providers |
|
|
418
|
-
| **Rate Limiting** | Per-provider `RateLimiter` prevents API flooding automatically |
|
|
419
|
-
| **Config Persistence** | Simple env file at `~/.sigma/config.env` — human readable |
|
|
420
|
-
| **First-Run Detection** | Marker file `.first_run_complete` ensures smooth onboarding |
|
|
421
|
-
| **Textual TUI** | Modern Python TUI framework with async support |
|
|
422
|
-
|
|
423
|
-
---
|
|
424
|
-
|
|
425
|
-
## 🔧 Configuration
|
|
426
|
-
|
|
427
|
-
### Config Location
|
|
428
|
-
|
|
429
|
-
```
|
|
430
|
-
~/.sigma/
|
|
431
|
-
├── config.env # API keys and settings
|
|
432
|
-
└── .first_run_complete # First-run marker
|
|
433
|
-
```
|
|
434
|
-
|
|
435
|
-
### Config File Format
|
|
436
|
-
|
|
437
|
-
```bash
|
|
438
|
-
# ~/.sigma/config.env
|
|
439
|
-
|
|
440
|
-
# API Keys
|
|
441
|
-
GOOGLE_API_KEY=AIzaSy...
|
|
442
|
-
OPENAI_API_KEY=sk-...
|
|
443
|
-
ANTHROPIC_API_KEY=sk-ant-...
|
|
444
|
-
GROQ_API_KEY=gsk_...
|
|
445
|
-
XAI_API_KEY=xai-...
|
|
446
|
-
|
|
447
|
-
# Defaults
|
|
448
|
-
DEFAULT_PROVIDER=google
|
|
449
|
-
DEFAULT_MODEL=gemini-2.0-flash
|
|
450
|
-
|
|
451
|
-
# Integrations
|
|
452
|
-
OLLAMA_HOST=http://localhost:11434
|
|
453
|
-
LEAN_ENABLED=true
|
|
454
|
-
LEAN_CLI_PATH=/usr/local/bin/lean
|
|
455
|
-
LEAN_DIRECTORY=/Users/you/Lean
|
|
456
|
-
|
|
457
|
-
# Data
|
|
458
|
-
OUTPUT_DIR=/Users/you/Documents/Sigma
|
|
459
|
-
CACHE_ENABLED=true
|
|
460
|
-
```
|
|
461
|
-
|
|
462
|
-
---
|
|
463
|
-
|
|
464
|
-
## 🗺️ Roadmap
|
|
465
|
-
|
|
466
|
-
### ✅ v3.3.0 (Current)
|
|
467
|
-
- [x] Auto-setup on first launch
|
|
468
|
-
- [x] LEAN auto-detection with install option
|
|
469
|
-
- [x] API rate limiting (no more timeouts!)
|
|
470
|
-
- [x] Ollama native tool call support
|
|
471
|
-
- [x] Enhanced ticker recognition
|
|
472
|
-
- [x] Animated tool call display
|
|
473
|
-
- [x] Pulsing σ indicator
|
|
474
|
-
- [x] Smart autocomplete
|
|
475
|
-
- [x] Comprehensive help system
|
|
476
|
-
|
|
477
|
-
### 🔜 v3.4.0 (Next)
|
|
478
|
-
- [ ] Portfolio tracking & management
|
|
479
|
-
- [ ] Watchlists with price alerts
|
|
480
|
-
- [ ] Options flow analysis
|
|
481
|
-
- [ ] Earnings calendar integration
|
|
482
|
-
- [ ] Multi-ticker comparison charts
|
|
483
|
-
- [ ] Export to CSV/PDF
|
|
484
|
-
|
|
485
|
-
### 🔮 v4.0.0 (Future)
|
|
486
|
-
- [ ] Full LEAN backtesting integration
|
|
487
|
-
- [ ] Paper trading mode
|
|
488
|
-
- [ ] Custom strategy builder (visual)
|
|
489
|
-
- [ ] Discord/Slack notifications
|
|
490
|
-
- [ ] REST API for external integrations
|
|
491
|
-
- [ ] Multi-user support
|
|
492
|
-
|
|
493
|
-
---
|
|
494
|
-
|
|
495
|
-
## 🛠️ Development
|
|
496
|
-
|
|
497
|
-
### Prerequisites
|
|
498
|
-
|
|
499
|
-
- Python 3.11+
|
|
500
|
-
- macOS (for native app bundle)
|
|
501
|
-
|
|
502
|
-
### Setup
|
|
503
|
-
|
|
504
|
-
```bash
|
|
505
|
-
# Clone
|
|
506
|
-
git clone https://github.com/yourusername/sigma.git
|
|
507
|
-
cd sigma
|
|
508
|
-
|
|
509
|
-
# Create virtual environment
|
|
510
|
-
python3 -m venv .venv
|
|
511
|
-
source .venv/bin/activate
|
|
512
|
-
|
|
513
|
-
# Install in development mode
|
|
514
|
-
pip install -e ".[dev]"
|
|
515
|
-
|
|
516
|
-
# Run
|
|
517
|
-
python -m sigma
|
|
518
|
-
```
|
|
519
|
-
|
|
520
|
-
### Build macOS App Bundle
|
|
521
|
-
|
|
522
|
-
```bash
|
|
523
|
-
./scripts/build.sh
|
|
524
|
-
|
|
525
|
-
# Outputs:
|
|
526
|
-
# - dist/sigma_terminal-3.3.0-py3-none-any.whl
|
|
527
|
-
# - dist/Sigma.app (drag to /Applications)
|
|
528
|
-
```
|
|
529
|
-
|
|
530
|
-
### Project Structure
|
|
531
|
-
|
|
532
|
-
```bash
|
|
533
|
-
sigma/
|
|
534
|
-
├── pyproject.toml # Package configuration
|
|
535
|
-
├── README.md # You are here
|
|
536
|
-
├── LICENSE # Proprietary license
|
|
537
|
-
├── scripts/
|
|
538
|
-
│ ├── build.sh # Build script
|
|
539
|
-
│ └── create_app.py # macOS app bundle creator
|
|
540
|
-
└── sigma/
|
|
541
|
-
├── __init__.py # Package exports
|
|
542
|
-
├── __main__.py # Entry point
|
|
543
|
-
└── ... # Core modules
|
|
544
|
-
```
|
|
545
|
-
|
|
546
|
-
---
|
|
547
|
-
|
|
548
|
-
## 🙏 Acknowledgments
|
|
549
|
-
|
|
550
|
-
Built with:
|
|
551
|
-
- [Textual](https://textual.textualize.io/) — Beautiful TUIs in Python
|
|
552
|
-
- [Rich](https://rich.readthedocs.io/) — Rich text formatting
|
|
553
|
-
- [yfinance](https://github.com/ranaroussi/yfinance) — Yahoo Finance data
|
|
554
|
-
- [Plotly](https://plotly.com/python/) — Interactive charts
|
|
555
|
-
- [Pydantic](https://docs.pydantic.dev/) — Data validation
|
|
556
|
-
|
|
557
|
-
AI Providers:
|
|
558
|
-
- [Google Gemini](https://ai.google.dev/)
|
|
559
|
-
- [OpenAI](https://openai.com/)
|
|
560
|
-
- [Anthropic](https://anthropic.com/)
|
|
561
|
-
- [Groq](https://groq.com/)
|
|
562
|
-
- [xAI](https://x.ai/)
|
|
563
|
-
- [Ollama](https://ollama.ai/)
|
|
564
|
-
|
|
565
|
-
---
|
|
566
|
-
|
|
567
|
-
## 📜 License
|
|
568
|
-
|
|
569
|
-
Proprietary. All rights reserved.
|
|
570
|
-
|
|
571
|
-
---
|
|
572
|
-
|
|
573
|
-
<p align="center">
|
|
574
|
-
<strong>Built with 🧠 by humans who got tired of slow, clunky finance tools.</strong>
|
|
575
|
-
</p>
|
|
576
|
-
|
|
577
|
-
<p align="center">
|
|
578
|
-
<code>σ</code> — Because your portfolio deserves an AI that actually works.
|
|
579
|
-
</p>
|
|
580
|
-
|
|
581
|
-
<p align="center">
|
|
582
|
-
<sub>Star ⭐ this repo if Sigma saved you time!</sub>
|
|
583
|
-
</p>
|
|
File without changes
|
|
File without changes
|
|
File without changes
|