sigma-terminal 2.0.0__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.
@@ -0,0 +1,47 @@
1
+ # Sigma Configuration
2
+ # Copy this file to .env and fill in your API keys
3
+
4
+ # =============================================================================
5
+ # LLM PROVIDERS (at least one required)
6
+ # =============================================================================
7
+
8
+ # Google Gemini (recommended - free tier available)
9
+ GOOGLE_API_KEY=
10
+
11
+ # OpenAI
12
+ OPENAI_API_KEY=
13
+
14
+ # Anthropic Claude
15
+ ANTHROPIC_API_KEY=
16
+
17
+ # Groq (free tier available)
18
+ GROQ_API_KEY=
19
+
20
+ # xAI Grok
21
+ XAI_API_KEY=
22
+
23
+ # =============================================================================
24
+ # SEARCH PROVIDERS (optional)
25
+ # =============================================================================
26
+
27
+ # Exa Search
28
+ EXASEARCH_API_KEY=
29
+
30
+ # Tavily Search
31
+ TAVILY_API_KEY=
32
+
33
+ # Serper (Google Search)
34
+ SERPER_API_KEY=
35
+
36
+ # =============================================================================
37
+ # FINANCIAL DATA (optional - yfinance is used by default for free)
38
+ # =============================================================================
39
+
40
+ # Financial Modeling Prep
41
+ FMP_API_KEY=
42
+
43
+ # Polygon.io
44
+ POLYGON_API_KEY=
45
+
46
+ # Alpha Vantage
47
+ ALPHA_VANTAGE_API_KEY=
@@ -0,0 +1,97 @@
1
+ # Sigma - Development Files
2
+
3
+ # Byte-compiled / optimized / DLL files
4
+ __pycache__/
5
+ *.py[cod]
6
+ *$py.class
7
+
8
+ # C extensions
9
+ *.so
10
+
11
+ # Distribution / packaging
12
+ .Python
13
+ build/
14
+ develop-eggs/
15
+ dist/
16
+ downloads/
17
+ eggs/
18
+ .eggs/
19
+ lib/
20
+ lib64/
21
+ parts/
22
+ sdist/
23
+ var/
24
+ wheels/
25
+ *.egg-info/
26
+ .installed.cfg
27
+ *.egg
28
+
29
+ # PyInstaller
30
+ *.manifest
31
+ *.spec
32
+
33
+ # Installer logs
34
+ pip-log.txt
35
+ pip-delete-this-directory.txt
36
+
37
+ # Unit test / coverage reports
38
+ htmlcov/
39
+ .tox/
40
+ .nox/
41
+ .coverage
42
+ .coverage.*
43
+ .cache
44
+ nosetests.xml
45
+ coverage.xml
46
+ *.cover
47
+ *.py,cover
48
+ .hypothesis/
49
+ .pytest_cache/
50
+
51
+ # Translations
52
+ *.mo
53
+ *.pot
54
+
55
+ # Environments
56
+ .env
57
+ .venv
58
+ env/
59
+ venv/
60
+ ENV/
61
+ env.bak/
62
+ venv.bak/
63
+
64
+ # IDEs
65
+ .idea/
66
+ .vscode/
67
+ *.swp
68
+ *.swo
69
+ *~
70
+
71
+ # Jupyter Notebook
72
+ .ipynb_checkpoints
73
+
74
+ # pyenv
75
+ .python-version
76
+
77
+ # mypy
78
+ .mypy_cache/
79
+ .dmypy.json
80
+ dmypy.json
81
+
82
+ # Pyre type checker
83
+ .pyre/
84
+
85
+ # Sigma specific
86
+ .sigma/
87
+ *.db
88
+ *.sqlite
89
+ *.sqlite3
90
+
91
+ # Logs
92
+ *.log
93
+ logs/
94
+
95
+ # OS files
96
+ .DS_Store
97
+ Thumbs.db
@@ -0,0 +1,42 @@
1
+ Sigma Proprietary License
2
+
3
+ Copyright (c) 2026 Desenyon. All Rights Reserved.
4
+
5
+ NOTICE: This software is proprietary and confidential. Unauthorized copying,
6
+ modification, distribution, or use of this software, via any medium, is
7
+ strictly prohibited.
8
+
9
+ TERMS AND CONDITIONS:
10
+
11
+ 1. LICENSE GRANT
12
+ You are granted a non-exclusive, non-transferable license to use this
13
+ software for personal or commercial purposes, subject to these terms.
14
+
15
+ 2. RESTRICTIONS
16
+ You may NOT:
17
+ - Copy, modify, or distribute the source code
18
+ - Reverse engineer, decompile, or disassemble the software
19
+ - Remove or alter any proprietary notices or labels
20
+ - Use the software to create derivative works
21
+ - Sublicense, sell, or transfer rights to the software
22
+
23
+ 3. OWNERSHIP
24
+ Sigma Labs retains all right, title, and interest in and to the software,
25
+ including all intellectual property rights.
26
+
27
+ 4. TERMINATION
28
+ This license is effective until terminated. It will terminate automatically
29
+ if you fail to comply with any term of this license.
30
+
31
+ 5. DISCLAIMER
32
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
33
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
34
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
35
+
36
+ 6. LIMITATION OF LIABILITY
37
+ IN NO EVENT SHALL SIGMA LABS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
38
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
39
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
40
+ DEALINGS IN THE SOFTWARE.
41
+
42
+ For licensing inquiries: legal@sigma.finance
@@ -0,0 +1,222 @@
1
+ Metadata-Version: 2.4
2
+ Name: sigma-terminal
3
+ Version: 2.0.0
4
+ Summary: Financial Research Agent
5
+ Project-URL: Homepage, https://github.com/desenyon/sigma
6
+ Project-URL: Documentation, https://github.com/desenyon/sigma/wiki
7
+ Project-URL: Changelog, https://github.com/desenyon/sigma/blob/main/CHANGELOG.md
8
+ Author: Desenyon
9
+ License: Proprietary
10
+ License-File: LICENSE
11
+ Keywords: agent,backtesting,finance,llm,research,stocks,trading
12
+ Classifier: Development Status :: 5 - Production/Stable
13
+ Classifier: Environment :: Console
14
+ Classifier: Intended Audience :: Financial and Insurance Industry
15
+ Classifier: License :: Other/Proprietary License
16
+ Classifier: Operating System :: MacOS
17
+ Classifier: Operating System :: POSIX :: Linux
18
+ Classifier: Programming Language :: Python :: 3.10
19
+ Classifier: Programming Language :: Python :: 3.11
20
+ Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Programming Language :: Python :: 3.13
22
+ Classifier: Topic :: Office/Business :: Financial :: Investment
23
+ Requires-Python: >=3.10
24
+ Requires-Dist: httpx>=0.27.0
25
+ Requires-Dist: numpy>=1.24
26
+ Requires-Dist: pandas>=2.0
27
+ Requires-Dist: plotext>=5.2.8
28
+ Requires-Dist: pydantic-settings>=2.0
29
+ Requires-Dist: pydantic>=2.0
30
+ Requires-Dist: python-dotenv>=1.0.0
31
+ Requires-Dist: rich>=13.0
32
+ Requires-Dist: yfinance>=0.2.40
33
+ Provides-Extra: dev
34
+ Requires-Dist: build; extra == 'dev'
35
+ Requires-Dist: mypy>=1.10; extra == 'dev'
36
+ Requires-Dist: pytest-asyncio>=0.23; extra == 'dev'
37
+ Requires-Dist: pytest>=8.0; extra == 'dev'
38
+ Requires-Dist: ruff>=0.4.0; extra == 'dev'
39
+ Requires-Dist: twine; extra == 'dev'
40
+ Description-Content-Type: text/markdown
41
+
42
+ # σ Sigma
43
+
44
+ **Financial Research Agent**
45
+
46
+ Sigma is an autonomous AI-powered financial research agent that provides institutional-grade market analysis. It combines multiple LLM providers with real-time market data to deliver comprehensive stock analysis, portfolio insights, and actionable investment research.
47
+
48
+ ## Features
49
+
50
+ - **Real-Time Market Data** via yfinance
51
+
52
+ - Stock quotes, historical prices, financial statements
53
+ - Analyst recommendations, insider trading, institutional holdings
54
+ - Options chains, dividends, earnings calendars
55
+ - Sector performance, market indices, market movers
56
+ - **18+ Financial Tools**
57
+
58
+ - `get_stock_quote` - Real-time price and key metrics
59
+ - `get_company_info` - Business description, financials
60
+ - `get_financial_statements` - Income, balance sheet, cash flow
61
+ - `get_analyst_recommendations` - Ratings and price targets
62
+ - `get_insider_trades` - Recent insider activity
63
+ - `get_institutional_holders` - Top institutional owners
64
+ - `get_options_chain` - Calls and puts data
65
+ - `get_dividends` - Dividend history and yield
66
+ - `technical_analysis` - RSI, MACD, moving averages
67
+ - `compare_stocks` - Multi-stock comparison
68
+ - `get_market_movers` - Top gainers/losers
69
+ - `get_sector_performance` - Sector ETF performance
70
+ - And more...
71
+ - **Multiple LLM Providers**
72
+
73
+ - OpenAI (GPT-4o)
74
+ - Anthropic (Claude)
75
+ - Google (Gemini)
76
+ - Groq (Llama)
77
+ - xAI (Grok)
78
+ - Ollama (local models)
79
+ - **Clean Terminal UI**
80
+
81
+ - Minimal, Claude Code-inspired interface
82
+ - Real-time tool execution display
83
+ - Markdown-formatted responses with tables
84
+
85
+ ## Installation
86
+
87
+ ```bash
88
+ # Clone the repository
89
+ git clone https://github.com/your-username/sigma.git
90
+ cd sigma
91
+
92
+ # Install dependencies
93
+ pip install -e .
94
+
95
+ # Set up your API keys
96
+ cp .env.example .env
97
+ # Edit .env with your API keys
98
+ ```
99
+
100
+ ## Configuration
101
+
102
+ Create a `.env` file with your API keys:
103
+
104
+ ```bash
105
+ # LLM Providers (at least one required)
106
+ GOOGLE_API_KEY=your-google-api-key
107
+ OPENAI_API_KEY=your-openai-api-key
108
+ ANTHROPIC_API_KEY=your-anthropic-api-key
109
+ GROQ_API_KEY=your-groq-api-key
110
+ XAI_API_KEY=your-xai-api-key
111
+
112
+ # Optional: Financial data APIs (for additional data sources)
113
+ FMP_API_KEY=your-fmp-api-key
114
+ POLYGON_API_KEY=your-polygon-api-key
115
+ ```
116
+
117
+ ## Usage
118
+
119
+ ### Interactive Mode
120
+
121
+ ```bash
122
+ sigma
123
+ ```
124
+
125
+ ```
126
+ σ Sigma Financial Research Agent
127
+
128
+ Provider: google │ Model: gemini-2.0-flash
129
+ Type /help for commands, /quit to exit
130
+
131
+ > Analyze NVDA stock
132
+
133
+ → get_stock_quote(NVDA) ✓ 245ms
134
+ → get_company_info(NVDA) ✓ 312ms
135
+ → get_analyst_recommendations(NVDA) ✓ 187ms
136
+ → technical_analysis(NVDA) ✓ 423ms
137
+
138
+ Called 4 tools in 1.2s
139
+
140
+ ## NVIDIA (NVDA) Analysis
141
+
142
+ **Current Price:** $191.13
143
+ **Market Cap:** $4.67T
144
+ ...
145
+ ```
146
+
147
+ ### Commands
148
+
149
+ - `/provider <name>` - Switch LLM provider (openai, anthropic, google, groq, ollama)
150
+ - `/model <name>` - Set model name
151
+ - `/clear` - Clear conversation history
152
+ - `/status` - Show current configuration
153
+ - `/help` - Show help
154
+ - `/quit` - Exit
155
+
156
+ ### Example Queries
157
+
158
+ ```
159
+ > What is the current price of AAPL?
160
+ > Compare MSFT, GOOGL, and AMZN on valuation metrics
161
+ > Give me a comprehensive analysis of Tesla
162
+ > What are the top market gainers today?
163
+ > Technical analysis on SPY
164
+ > Show me insider trades for NVDA
165
+ > What's the options chain for AAPL?
166
+ ```
167
+
168
+ ## Python API
169
+
170
+ ```python
171
+ import asyncio
172
+ from sigma import SigmaAgent, LLMProvider
173
+
174
+ async def main():
175
+ # Create agent
176
+ agent = SigmaAgent(provider=LLMProvider.GOOGLE)
177
+
178
+ # Run analysis
179
+ result = await agent.run("Analyze AAPL stock")
180
+ print(result)
181
+
182
+ # Get execution stats
183
+ stats = agent.get_stats()
184
+ print(f"Tools called: {stats['tools_called']}")
185
+
186
+ asyncio.run(main())
187
+ ```
188
+
189
+ ## Architecture
190
+
191
+ ```
192
+ sigma/
193
+ ├── core/
194
+ │ ├── agent.py # Main agent logic
195
+ │ ├── config.py # Configuration management
196
+ │ ├── llm.py # LLM provider implementations
197
+ │ └── models.py # Data models
198
+ ├── tools/
199
+ │ └── financial.py # Financial data tools (yfinance)
200
+ ├── ui/
201
+ │ └── __init__.py # UI components
202
+ └── app.py # CLI application
203
+ ```
204
+
205
+ ## Requirements
206
+
207
+ - Python 3.10+
208
+ - httpx
209
+ - pydantic
210
+ - pydantic-settings
211
+ - rich
212
+ - yfinance
213
+ - pandas
214
+ - numpy
215
+
216
+ ## License
217
+
218
+ Check File
219
+
220
+ ---
221
+
222
+ *Sigma - Institutional-grade financial research at your fingertips.*
@@ -0,0 +1,181 @@
1
+ # σ Sigma
2
+
3
+ **Financial Research Agent**
4
+
5
+ Sigma is an autonomous AI-powered financial research agent that provides institutional-grade market analysis. It combines multiple LLM providers with real-time market data to deliver comprehensive stock analysis, portfolio insights, and actionable investment research.
6
+
7
+ ## Features
8
+
9
+ - **Real-Time Market Data** via yfinance
10
+
11
+ - Stock quotes, historical prices, financial statements
12
+ - Analyst recommendations, insider trading, institutional holdings
13
+ - Options chains, dividends, earnings calendars
14
+ - Sector performance, market indices, market movers
15
+ - **18+ Financial Tools**
16
+
17
+ - `get_stock_quote` - Real-time price and key metrics
18
+ - `get_company_info` - Business description, financials
19
+ - `get_financial_statements` - Income, balance sheet, cash flow
20
+ - `get_analyst_recommendations` - Ratings and price targets
21
+ - `get_insider_trades` - Recent insider activity
22
+ - `get_institutional_holders` - Top institutional owners
23
+ - `get_options_chain` - Calls and puts data
24
+ - `get_dividends` - Dividend history and yield
25
+ - `technical_analysis` - RSI, MACD, moving averages
26
+ - `compare_stocks` - Multi-stock comparison
27
+ - `get_market_movers` - Top gainers/losers
28
+ - `get_sector_performance` - Sector ETF performance
29
+ - And more...
30
+ - **Multiple LLM Providers**
31
+
32
+ - OpenAI (GPT-4o)
33
+ - Anthropic (Claude)
34
+ - Google (Gemini)
35
+ - Groq (Llama)
36
+ - xAI (Grok)
37
+ - Ollama (local models)
38
+ - **Clean Terminal UI**
39
+
40
+ - Minimal, Claude Code-inspired interface
41
+ - Real-time tool execution display
42
+ - Markdown-formatted responses with tables
43
+
44
+ ## Installation
45
+
46
+ ```bash
47
+ # Clone the repository
48
+ git clone https://github.com/your-username/sigma.git
49
+ cd sigma
50
+
51
+ # Install dependencies
52
+ pip install -e .
53
+
54
+ # Set up your API keys
55
+ cp .env.example .env
56
+ # Edit .env with your API keys
57
+ ```
58
+
59
+ ## Configuration
60
+
61
+ Create a `.env` file with your API keys:
62
+
63
+ ```bash
64
+ # LLM Providers (at least one required)
65
+ GOOGLE_API_KEY=your-google-api-key
66
+ OPENAI_API_KEY=your-openai-api-key
67
+ ANTHROPIC_API_KEY=your-anthropic-api-key
68
+ GROQ_API_KEY=your-groq-api-key
69
+ XAI_API_KEY=your-xai-api-key
70
+
71
+ # Optional: Financial data APIs (for additional data sources)
72
+ FMP_API_KEY=your-fmp-api-key
73
+ POLYGON_API_KEY=your-polygon-api-key
74
+ ```
75
+
76
+ ## Usage
77
+
78
+ ### Interactive Mode
79
+
80
+ ```bash
81
+ sigma
82
+ ```
83
+
84
+ ```
85
+ σ Sigma Financial Research Agent
86
+
87
+ Provider: google │ Model: gemini-2.0-flash
88
+ Type /help for commands, /quit to exit
89
+
90
+ > Analyze NVDA stock
91
+
92
+ → get_stock_quote(NVDA) ✓ 245ms
93
+ → get_company_info(NVDA) ✓ 312ms
94
+ → get_analyst_recommendations(NVDA) ✓ 187ms
95
+ → technical_analysis(NVDA) ✓ 423ms
96
+
97
+ Called 4 tools in 1.2s
98
+
99
+ ## NVIDIA (NVDA) Analysis
100
+
101
+ **Current Price:** $191.13
102
+ **Market Cap:** $4.67T
103
+ ...
104
+ ```
105
+
106
+ ### Commands
107
+
108
+ - `/provider <name>` - Switch LLM provider (openai, anthropic, google, groq, ollama)
109
+ - `/model <name>` - Set model name
110
+ - `/clear` - Clear conversation history
111
+ - `/status` - Show current configuration
112
+ - `/help` - Show help
113
+ - `/quit` - Exit
114
+
115
+ ### Example Queries
116
+
117
+ ```
118
+ > What is the current price of AAPL?
119
+ > Compare MSFT, GOOGL, and AMZN on valuation metrics
120
+ > Give me a comprehensive analysis of Tesla
121
+ > What are the top market gainers today?
122
+ > Technical analysis on SPY
123
+ > Show me insider trades for NVDA
124
+ > What's the options chain for AAPL?
125
+ ```
126
+
127
+ ## Python API
128
+
129
+ ```python
130
+ import asyncio
131
+ from sigma import SigmaAgent, LLMProvider
132
+
133
+ async def main():
134
+ # Create agent
135
+ agent = SigmaAgent(provider=LLMProvider.GOOGLE)
136
+
137
+ # Run analysis
138
+ result = await agent.run("Analyze AAPL stock")
139
+ print(result)
140
+
141
+ # Get execution stats
142
+ stats = agent.get_stats()
143
+ print(f"Tools called: {stats['tools_called']}")
144
+
145
+ asyncio.run(main())
146
+ ```
147
+
148
+ ## Architecture
149
+
150
+ ```
151
+ sigma/
152
+ ├── core/
153
+ │ ├── agent.py # Main agent logic
154
+ │ ├── config.py # Configuration management
155
+ │ ├── llm.py # LLM provider implementations
156
+ │ └── models.py # Data models
157
+ ├── tools/
158
+ │ └── financial.py # Financial data tools (yfinance)
159
+ ├── ui/
160
+ │ └── __init__.py # UI components
161
+ └── app.py # CLI application
162
+ ```
163
+
164
+ ## Requirements
165
+
166
+ - Python 3.10+
167
+ - httpx
168
+ - pydantic
169
+ - pydantic-settings
170
+ - rich
171
+ - yfinance
172
+ - pandas
173
+ - numpy
174
+
175
+ ## License
176
+
177
+ Check File
178
+
179
+ ---
180
+
181
+ *Sigma - Institutional-grade financial research at your fingertips.*