TradeAssist 0.6.7__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.
Potentially problematic release.
This version of TradeAssist might be problematic. Click here for more details.
- tradeassist-0.6.7/PKG-INFO +140 -0
- tradeassist-0.6.7/README.md +108 -0
- tradeassist-0.6.7/TradeAssist.egg-info/PKG-INFO +140 -0
- tradeassist-0.6.7/TradeAssist.egg-info/SOURCES.txt +27 -0
- tradeassist-0.6.7/TradeAssist.egg-info/dependency_links.txt +1 -0
- tradeassist-0.6.7/TradeAssist.egg-info/entry_points.txt +2 -0
- tradeassist-0.6.7/TradeAssist.egg-info/requires.txt +15 -0
- tradeassist-0.6.7/TradeAssist.egg-info/top_level.txt +1 -0
- tradeassist-0.6.7/app/__init__.py +4 -0
- tradeassist-0.6.7/app/backend/__init__.py +2 -0
- tradeassist-0.6.7/app/backend/analyzer.py +324 -0
- tradeassist-0.6.7/app/backend/data_models.py +24 -0
- tradeassist-0.6.7/app/backend/gemini_client.py +176 -0
- tradeassist-0.6.7/app/backend/sec_client.py +126 -0
- tradeassist-0.6.7/app/config.py +39 -0
- tradeassist-0.6.7/app/gui/__init__.py +2 -0
- tradeassist-0.6.7/app/gui/components/__init__.py +1 -0
- tradeassist-0.6.7/app/gui/components/filing_panel.py +254 -0
- tradeassist-0.6.7/app/gui/components/prompt_panel.py +304 -0
- tradeassist-0.6.7/app/gui/components/results_panel.py +457 -0
- tradeassist-0.6.7/app/gui/components/saved_analyses_dialog.py +158 -0
- tradeassist-0.6.7/app/gui/components/settings_dialog.py +100 -0
- tradeassist-0.6.7/app/gui/main_window.py +459 -0
- tradeassist-0.6.7/app/gui/worker.py +202 -0
- tradeassist-0.6.7/app/history_manager.py +164 -0
- tradeassist-0.6.7/app/main.py +186 -0
- tradeassist-0.6.7/app/settings_manager.py +82 -0
- tradeassist-0.6.7/pyproject.toml +53 -0
- tradeassist-0.6.7/setup.cfg +4 -0
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: TradeAssist
|
|
3
|
+
Version: 0.6.7
|
|
4
|
+
Summary: SEC-Gemini AI Workspace with modern visualizer and analyzer features
|
|
5
|
+
Author: Frank Morgan
|
|
6
|
+
Project-URL: Homepage, https://github.com/subnoize90/TradeAssist
|
|
7
|
+
Project-URL: Documentation, https://github.com/subnoize90/TradeAssist#readme
|
|
8
|
+
Project-URL: Repository, https://github.com/subnoize90/TradeAssist.git
|
|
9
|
+
Project-URL: Bug Tracker, https://github.com/subnoize90/TradeAssist/issues
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
12
|
+
Classifier: Operating System :: OS Independent
|
|
13
|
+
Classifier: Intended Audience :: Financial and Insurance Industry
|
|
14
|
+
Classifier: Topic :: Office/Business :: Financial :: Investment
|
|
15
|
+
Requires-Python: >=3.11
|
|
16
|
+
Description-Content-Type: text/markdown
|
|
17
|
+
Requires-Dist: google-genai>=2.23.0
|
|
18
|
+
Requires-Dist: pydantic>=2.13.5
|
|
19
|
+
Requires-Dist: PyQt6>=6.11.0
|
|
20
|
+
Requires-Dist: PyQt6-Qt6>=6.11.2
|
|
21
|
+
Requires-Dist: PyQt6_sip>=13.12.0
|
|
22
|
+
Requires-Dist: pandas>=2.3.3
|
|
23
|
+
Requires-Dist: numpy>=1.26.4
|
|
24
|
+
Requires-Dist: yfinance>=1.7.0
|
|
25
|
+
Requires-Dist: finnhub-python>=2.4.29
|
|
26
|
+
Requires-Dist: beautifulsoup4>=4.15.0
|
|
27
|
+
Requires-Dist: lxml>=6.1.3
|
|
28
|
+
Requires-Dist: curl_cffi>=0.16.3
|
|
29
|
+
Requires-Dist: peewee>=4.5.1
|
|
30
|
+
Requires-Dist: websockets>=16.1.1
|
|
31
|
+
Requires-Dist: requests>=2.34.2
|
|
32
|
+
|
|
33
|
+
# TradeAssist: Gemini SEC Filing Analyzer
|
|
34
|
+
|
|
35
|
+
A modern, highly modular PyQt6 application that maps stock tickers to SEC CIK records, downloads specific SEC EDGAR filings (like 10-Ks, 10-Qs, and 8-Ks), parses their clean text, and feeds them into Google's Gemini models (using the new `google-genai` SDK) using custom or preconfigured prompt instructions to receive clean, structured JSON or plain text data.
|
|
36
|
+
|
|
37
|
+
This workspace separates the core Gemini/SEC analysis **backend logic** completely from the **PyQt GUI layer**, enabling you to easily import the core analytical engine (`GeminiSecAnalyzer`) directly into your trading bot or automated pipelines without dragging in any GUI dependencies.
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## Project Directory Structure
|
|
42
|
+
|
|
43
|
+
```text
|
|
44
|
+
TradeAssist/
|
|
45
|
+
├── app/ # Main application package
|
|
46
|
+
│ ├── __init__.py # Package entry point
|
|
47
|
+
│ ├── config.py # Central configurations (API keys, logging, SEC headers)
|
|
48
|
+
│ │
|
|
49
|
+
│ ├── backend/ # Pure Python backend (NO PyQt dependencies)
|
|
50
|
+
│ │ ├── __init__.py
|
|
51
|
+
│ │ ├── data_models.py # Pydantic schemas for Gemini structured JSON outputs
|
|
52
|
+
│ │ ├── sec_client.py # SEC EDGAR client (CIK mapping, listing & downloading filings)
|
|
53
|
+
│ │ ├── gemini_client.py # Google GenAI wrapper with exponential rate-limit retries
|
|
54
|
+
│ │ └── analyzer.py # Coordinating core engine coupling Gemini and SEC
|
|
55
|
+
│ │
|
|
56
|
+
│ ├── gui/ # PyQt6 User Interface package
|
|
57
|
+
│ │ ├── __init__.py
|
|
58
|
+
│ │ ├── main_window.py # Main window orchestrating components & worker threads
|
|
59
|
+
│ │ ├── worker.py # Asynchronous QThread workers (keeps GUI responsive)
|
|
60
|
+
│ │ └── components/ # Reusable GUI widgets
|
|
61
|
+
│ │ ├── __init__.py
|
|
62
|
+
│ │ ├── filing_panel.py # Search, list, select filings; toggle bot scan mode
|
|
63
|
+
│ │ ├── prompt_panel.py # Model configuration (temperature, schema, custom/preset prompts)
|
|
64
|
+
│ │ └── results_panel.py # Dynamic HTML renderer for structured/text results
|
|
65
|
+
│ │
|
|
66
|
+
│ └── main.py # Graphical App entry point (QApplication)
|
|
67
|
+
│
|
|
68
|
+
├── sec.py # [Reference] Original single-file bot implementation
|
|
69
|
+
├── requirements.txt # Python library dependencies
|
|
70
|
+
└── README.md # This documentation file
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
## Features
|
|
76
|
+
|
|
77
|
+
1. **Two Core Analysis Modes**:
|
|
78
|
+
- **Specific Filing Analysis**: Select a specific filing (e.g. 10-K, 10-Q, 8-K), choose/input a prompt, and extract targeted details (Risk factors, Balance sheets, Dilution signs).
|
|
79
|
+
- **Comprehensive Bot Scan**: Check the box to run a multi-variable scan across news headlines, RSS filing metadata, share counts, and financial statements directly—mirroring your original bot scanning logic.
|
|
80
|
+
2. **Strict Structured JSON Responses**: Uses Pydantic schemas (under `data_models.py`) coupled with Gemini's `response_schema` mode to guarantee output structure for bot pipelines.
|
|
81
|
+
3. **Decoupled Backend Engine**: Built cleanly using the official new `google-genai` SDK, ready to be dropped into any script.
|
|
82
|
+
4. **Asynchronous Multi-threading**: SEC scraping and Gemini inference runs in native PyQt background threads to ensure the UI remains fully responsive.
|
|
83
|
+
5. **Modern styling**: Uses the polished Fusion desktop palette and rich-HTML color-coded results cards for analysis ratings.
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
## Setup & Running
|
|
88
|
+
|
|
89
|
+
### 1. Install Dependencies
|
|
90
|
+
Ensure you have a Python 3.11+ environment active, then install the required libraries:
|
|
91
|
+
```bash
|
|
92
|
+
pip install -r requirements.txt
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
### 2. Set Your API Keys
|
|
96
|
+
Ensure your Gemini API key is configured in your environment:
|
|
97
|
+
```powershell
|
|
98
|
+
# Windows PowerShell
|
|
99
|
+
$env:GEMINI_API_KEY="your-gemini-api-key-here"
|
|
100
|
+
|
|
101
|
+
# Windows Command Prompt
|
|
102
|
+
set GEMINI_API_KEY=your-gemini-api-key-here
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### 3. Run the GUI App
|
|
106
|
+
Launch the main dashboard:
|
|
107
|
+
```bash
|
|
108
|
+
python -m app.main
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
|
|
113
|
+
## Drop-in Integration: Plugging Into Your Trading Bot
|
|
114
|
+
|
|
115
|
+
Because the backend logic is completely decoupled from the PyQt GUI library, you can import and run the exact same analysis programmatically inside your automated trading bot in just a few lines of code!
|
|
116
|
+
|
|
117
|
+
Here is a simple example showing how to plug it in:
|
|
118
|
+
|
|
119
|
+
```python
|
|
120
|
+
import os
|
|
121
|
+
from app.backend.analyzer import GeminiSecAnalyzer
|
|
122
|
+
from app.backend.data_models import StockAnalysis
|
|
123
|
+
|
|
124
|
+
# 1. Initialize analyzer (it picks up GEMINI_API_KEY from environment)
|
|
125
|
+
analyzer = GeminiSecAnalyzer()
|
|
126
|
+
|
|
127
|
+
# 2. Run the comprehensive bot scan on a ticker (returns strict StockAnalysis pydantic model)
|
|
128
|
+
result: StockAnalysis = analyzer.analyze_ticker_comprehensive("TSLA")
|
|
129
|
+
|
|
130
|
+
# 3. Read the structured scores and trigger bot decisions!
|
|
131
|
+
print(f"News Score: {result.news_score}/10")
|
|
132
|
+
print(f"SEC Filing Score: {result.SEC_score}/10")
|
|
133
|
+
print(f"Dilution Risk: {result.dilution_score}/10")
|
|
134
|
+
print(f"Cash Burn Risk: {result.cash_burn_score}/10")
|
|
135
|
+
|
|
136
|
+
if result.dilution_score > 7 or result.cash_burn_score > 8:
|
|
137
|
+
print("⚠️ WARNING: High risk detected! Aborting stock purchasing pipeline.")
|
|
138
|
+
else:
|
|
139
|
+
print("✅ Target meets bot risk tolerance standards. Proceeding to market evaluation.")
|
|
140
|
+
```
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
# TradeAssist: Gemini SEC Filing Analyzer
|
|
2
|
+
|
|
3
|
+
A modern, highly modular PyQt6 application that maps stock tickers to SEC CIK records, downloads specific SEC EDGAR filings (like 10-Ks, 10-Qs, and 8-Ks), parses their clean text, and feeds them into Google's Gemini models (using the new `google-genai` SDK) using custom or preconfigured prompt instructions to receive clean, structured JSON or plain text data.
|
|
4
|
+
|
|
5
|
+
This workspace separates the core Gemini/SEC analysis **backend logic** completely from the **PyQt GUI layer**, enabling you to easily import the core analytical engine (`GeminiSecAnalyzer`) directly into your trading bot or automated pipelines without dragging in any GUI dependencies.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Project Directory Structure
|
|
10
|
+
|
|
11
|
+
```text
|
|
12
|
+
TradeAssist/
|
|
13
|
+
├── app/ # Main application package
|
|
14
|
+
│ ├── __init__.py # Package entry point
|
|
15
|
+
│ ├── config.py # Central configurations (API keys, logging, SEC headers)
|
|
16
|
+
│ │
|
|
17
|
+
│ ├── backend/ # Pure Python backend (NO PyQt dependencies)
|
|
18
|
+
│ │ ├── __init__.py
|
|
19
|
+
│ │ ├── data_models.py # Pydantic schemas for Gemini structured JSON outputs
|
|
20
|
+
│ │ ├── sec_client.py # SEC EDGAR client (CIK mapping, listing & downloading filings)
|
|
21
|
+
│ │ ├── gemini_client.py # Google GenAI wrapper with exponential rate-limit retries
|
|
22
|
+
│ │ └── analyzer.py # Coordinating core engine coupling Gemini and SEC
|
|
23
|
+
│ │
|
|
24
|
+
│ ├── gui/ # PyQt6 User Interface package
|
|
25
|
+
│ │ ├── __init__.py
|
|
26
|
+
│ │ ├── main_window.py # Main window orchestrating components & worker threads
|
|
27
|
+
│ │ ├── worker.py # Asynchronous QThread workers (keeps GUI responsive)
|
|
28
|
+
│ │ └── components/ # Reusable GUI widgets
|
|
29
|
+
│ │ ├── __init__.py
|
|
30
|
+
│ │ ├── filing_panel.py # Search, list, select filings; toggle bot scan mode
|
|
31
|
+
│ │ ├── prompt_panel.py # Model configuration (temperature, schema, custom/preset prompts)
|
|
32
|
+
│ │ └── results_panel.py # Dynamic HTML renderer for structured/text results
|
|
33
|
+
│ │
|
|
34
|
+
│ └── main.py # Graphical App entry point (QApplication)
|
|
35
|
+
│
|
|
36
|
+
├── sec.py # [Reference] Original single-file bot implementation
|
|
37
|
+
├── requirements.txt # Python library dependencies
|
|
38
|
+
└── README.md # This documentation file
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## Features
|
|
44
|
+
|
|
45
|
+
1. **Two Core Analysis Modes**:
|
|
46
|
+
- **Specific Filing Analysis**: Select a specific filing (e.g. 10-K, 10-Q, 8-K), choose/input a prompt, and extract targeted details (Risk factors, Balance sheets, Dilution signs).
|
|
47
|
+
- **Comprehensive Bot Scan**: Check the box to run a multi-variable scan across news headlines, RSS filing metadata, share counts, and financial statements directly—mirroring your original bot scanning logic.
|
|
48
|
+
2. **Strict Structured JSON Responses**: Uses Pydantic schemas (under `data_models.py`) coupled with Gemini's `response_schema` mode to guarantee output structure for bot pipelines.
|
|
49
|
+
3. **Decoupled Backend Engine**: Built cleanly using the official new `google-genai` SDK, ready to be dropped into any script.
|
|
50
|
+
4. **Asynchronous Multi-threading**: SEC scraping and Gemini inference runs in native PyQt background threads to ensure the UI remains fully responsive.
|
|
51
|
+
5. **Modern styling**: Uses the polished Fusion desktop palette and rich-HTML color-coded results cards for analysis ratings.
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## Setup & Running
|
|
56
|
+
|
|
57
|
+
### 1. Install Dependencies
|
|
58
|
+
Ensure you have a Python 3.11+ environment active, then install the required libraries:
|
|
59
|
+
```bash
|
|
60
|
+
pip install -r requirements.txt
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### 2. Set Your API Keys
|
|
64
|
+
Ensure your Gemini API key is configured in your environment:
|
|
65
|
+
```powershell
|
|
66
|
+
# Windows PowerShell
|
|
67
|
+
$env:GEMINI_API_KEY="your-gemini-api-key-here"
|
|
68
|
+
|
|
69
|
+
# Windows Command Prompt
|
|
70
|
+
set GEMINI_API_KEY=your-gemini-api-key-here
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### 3. Run the GUI App
|
|
74
|
+
Launch the main dashboard:
|
|
75
|
+
```bash
|
|
76
|
+
python -m app.main
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
## Drop-in Integration: Plugging Into Your Trading Bot
|
|
82
|
+
|
|
83
|
+
Because the backend logic is completely decoupled from the PyQt GUI library, you can import and run the exact same analysis programmatically inside your automated trading bot in just a few lines of code!
|
|
84
|
+
|
|
85
|
+
Here is a simple example showing how to plug it in:
|
|
86
|
+
|
|
87
|
+
```python
|
|
88
|
+
import os
|
|
89
|
+
from app.backend.analyzer import GeminiSecAnalyzer
|
|
90
|
+
from app.backend.data_models import StockAnalysis
|
|
91
|
+
|
|
92
|
+
# 1. Initialize analyzer (it picks up GEMINI_API_KEY from environment)
|
|
93
|
+
analyzer = GeminiSecAnalyzer()
|
|
94
|
+
|
|
95
|
+
# 2. Run the comprehensive bot scan on a ticker (returns strict StockAnalysis pydantic model)
|
|
96
|
+
result: StockAnalysis = analyzer.analyze_ticker_comprehensive("TSLA")
|
|
97
|
+
|
|
98
|
+
# 3. Read the structured scores and trigger bot decisions!
|
|
99
|
+
print(f"News Score: {result.news_score}/10")
|
|
100
|
+
print(f"SEC Filing Score: {result.SEC_score}/10")
|
|
101
|
+
print(f"Dilution Risk: {result.dilution_score}/10")
|
|
102
|
+
print(f"Cash Burn Risk: {result.cash_burn_score}/10")
|
|
103
|
+
|
|
104
|
+
if result.dilution_score > 7 or result.cash_burn_score > 8:
|
|
105
|
+
print("⚠️ WARNING: High risk detected! Aborting stock purchasing pipeline.")
|
|
106
|
+
else:
|
|
107
|
+
print("✅ Target meets bot risk tolerance standards. Proceeding to market evaluation.")
|
|
108
|
+
```
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: TradeAssist
|
|
3
|
+
Version: 0.6.7
|
|
4
|
+
Summary: SEC-Gemini AI Workspace with modern visualizer and analyzer features
|
|
5
|
+
Author: Frank Morgan
|
|
6
|
+
Project-URL: Homepage, https://github.com/subnoize90/TradeAssist
|
|
7
|
+
Project-URL: Documentation, https://github.com/subnoize90/TradeAssist#readme
|
|
8
|
+
Project-URL: Repository, https://github.com/subnoize90/TradeAssist.git
|
|
9
|
+
Project-URL: Bug Tracker, https://github.com/subnoize90/TradeAssist/issues
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
12
|
+
Classifier: Operating System :: OS Independent
|
|
13
|
+
Classifier: Intended Audience :: Financial and Insurance Industry
|
|
14
|
+
Classifier: Topic :: Office/Business :: Financial :: Investment
|
|
15
|
+
Requires-Python: >=3.11
|
|
16
|
+
Description-Content-Type: text/markdown
|
|
17
|
+
Requires-Dist: google-genai>=2.23.0
|
|
18
|
+
Requires-Dist: pydantic>=2.13.5
|
|
19
|
+
Requires-Dist: PyQt6>=6.11.0
|
|
20
|
+
Requires-Dist: PyQt6-Qt6>=6.11.2
|
|
21
|
+
Requires-Dist: PyQt6_sip>=13.12.0
|
|
22
|
+
Requires-Dist: pandas>=2.3.3
|
|
23
|
+
Requires-Dist: numpy>=1.26.4
|
|
24
|
+
Requires-Dist: yfinance>=1.7.0
|
|
25
|
+
Requires-Dist: finnhub-python>=2.4.29
|
|
26
|
+
Requires-Dist: beautifulsoup4>=4.15.0
|
|
27
|
+
Requires-Dist: lxml>=6.1.3
|
|
28
|
+
Requires-Dist: curl_cffi>=0.16.3
|
|
29
|
+
Requires-Dist: peewee>=4.5.1
|
|
30
|
+
Requires-Dist: websockets>=16.1.1
|
|
31
|
+
Requires-Dist: requests>=2.34.2
|
|
32
|
+
|
|
33
|
+
# TradeAssist: Gemini SEC Filing Analyzer
|
|
34
|
+
|
|
35
|
+
A modern, highly modular PyQt6 application that maps stock tickers to SEC CIK records, downloads specific SEC EDGAR filings (like 10-Ks, 10-Qs, and 8-Ks), parses their clean text, and feeds them into Google's Gemini models (using the new `google-genai` SDK) using custom or preconfigured prompt instructions to receive clean, structured JSON or plain text data.
|
|
36
|
+
|
|
37
|
+
This workspace separates the core Gemini/SEC analysis **backend logic** completely from the **PyQt GUI layer**, enabling you to easily import the core analytical engine (`GeminiSecAnalyzer`) directly into your trading bot or automated pipelines without dragging in any GUI dependencies.
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## Project Directory Structure
|
|
42
|
+
|
|
43
|
+
```text
|
|
44
|
+
TradeAssist/
|
|
45
|
+
├── app/ # Main application package
|
|
46
|
+
│ ├── __init__.py # Package entry point
|
|
47
|
+
│ ├── config.py # Central configurations (API keys, logging, SEC headers)
|
|
48
|
+
│ │
|
|
49
|
+
│ ├── backend/ # Pure Python backend (NO PyQt dependencies)
|
|
50
|
+
│ │ ├── __init__.py
|
|
51
|
+
│ │ ├── data_models.py # Pydantic schemas for Gemini structured JSON outputs
|
|
52
|
+
│ │ ├── sec_client.py # SEC EDGAR client (CIK mapping, listing & downloading filings)
|
|
53
|
+
│ │ ├── gemini_client.py # Google GenAI wrapper with exponential rate-limit retries
|
|
54
|
+
│ │ └── analyzer.py # Coordinating core engine coupling Gemini and SEC
|
|
55
|
+
│ │
|
|
56
|
+
│ ├── gui/ # PyQt6 User Interface package
|
|
57
|
+
│ │ ├── __init__.py
|
|
58
|
+
│ │ ├── main_window.py # Main window orchestrating components & worker threads
|
|
59
|
+
│ │ ├── worker.py # Asynchronous QThread workers (keeps GUI responsive)
|
|
60
|
+
│ │ └── components/ # Reusable GUI widgets
|
|
61
|
+
│ │ ├── __init__.py
|
|
62
|
+
│ │ ├── filing_panel.py # Search, list, select filings; toggle bot scan mode
|
|
63
|
+
│ │ ├── prompt_panel.py # Model configuration (temperature, schema, custom/preset prompts)
|
|
64
|
+
│ │ └── results_panel.py # Dynamic HTML renderer for structured/text results
|
|
65
|
+
│ │
|
|
66
|
+
│ └── main.py # Graphical App entry point (QApplication)
|
|
67
|
+
│
|
|
68
|
+
├── sec.py # [Reference] Original single-file bot implementation
|
|
69
|
+
├── requirements.txt # Python library dependencies
|
|
70
|
+
└── README.md # This documentation file
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
## Features
|
|
76
|
+
|
|
77
|
+
1. **Two Core Analysis Modes**:
|
|
78
|
+
- **Specific Filing Analysis**: Select a specific filing (e.g. 10-K, 10-Q, 8-K), choose/input a prompt, and extract targeted details (Risk factors, Balance sheets, Dilution signs).
|
|
79
|
+
- **Comprehensive Bot Scan**: Check the box to run a multi-variable scan across news headlines, RSS filing metadata, share counts, and financial statements directly—mirroring your original bot scanning logic.
|
|
80
|
+
2. **Strict Structured JSON Responses**: Uses Pydantic schemas (under `data_models.py`) coupled with Gemini's `response_schema` mode to guarantee output structure for bot pipelines.
|
|
81
|
+
3. **Decoupled Backend Engine**: Built cleanly using the official new `google-genai` SDK, ready to be dropped into any script.
|
|
82
|
+
4. **Asynchronous Multi-threading**: SEC scraping and Gemini inference runs in native PyQt background threads to ensure the UI remains fully responsive.
|
|
83
|
+
5. **Modern styling**: Uses the polished Fusion desktop palette and rich-HTML color-coded results cards for analysis ratings.
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
## Setup & Running
|
|
88
|
+
|
|
89
|
+
### 1. Install Dependencies
|
|
90
|
+
Ensure you have a Python 3.11+ environment active, then install the required libraries:
|
|
91
|
+
```bash
|
|
92
|
+
pip install -r requirements.txt
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
### 2. Set Your API Keys
|
|
96
|
+
Ensure your Gemini API key is configured in your environment:
|
|
97
|
+
```powershell
|
|
98
|
+
# Windows PowerShell
|
|
99
|
+
$env:GEMINI_API_KEY="your-gemini-api-key-here"
|
|
100
|
+
|
|
101
|
+
# Windows Command Prompt
|
|
102
|
+
set GEMINI_API_KEY=your-gemini-api-key-here
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### 3. Run the GUI App
|
|
106
|
+
Launch the main dashboard:
|
|
107
|
+
```bash
|
|
108
|
+
python -m app.main
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
|
|
113
|
+
## Drop-in Integration: Plugging Into Your Trading Bot
|
|
114
|
+
|
|
115
|
+
Because the backend logic is completely decoupled from the PyQt GUI library, you can import and run the exact same analysis programmatically inside your automated trading bot in just a few lines of code!
|
|
116
|
+
|
|
117
|
+
Here is a simple example showing how to plug it in:
|
|
118
|
+
|
|
119
|
+
```python
|
|
120
|
+
import os
|
|
121
|
+
from app.backend.analyzer import GeminiSecAnalyzer
|
|
122
|
+
from app.backend.data_models import StockAnalysis
|
|
123
|
+
|
|
124
|
+
# 1. Initialize analyzer (it picks up GEMINI_API_KEY from environment)
|
|
125
|
+
analyzer = GeminiSecAnalyzer()
|
|
126
|
+
|
|
127
|
+
# 2. Run the comprehensive bot scan on a ticker (returns strict StockAnalysis pydantic model)
|
|
128
|
+
result: StockAnalysis = analyzer.analyze_ticker_comprehensive("TSLA")
|
|
129
|
+
|
|
130
|
+
# 3. Read the structured scores and trigger bot decisions!
|
|
131
|
+
print(f"News Score: {result.news_score}/10")
|
|
132
|
+
print(f"SEC Filing Score: {result.SEC_score}/10")
|
|
133
|
+
print(f"Dilution Risk: {result.dilution_score}/10")
|
|
134
|
+
print(f"Cash Burn Risk: {result.cash_burn_score}/10")
|
|
135
|
+
|
|
136
|
+
if result.dilution_score > 7 or result.cash_burn_score > 8:
|
|
137
|
+
print("⚠️ WARNING: High risk detected! Aborting stock purchasing pipeline.")
|
|
138
|
+
else:
|
|
139
|
+
print("✅ Target meets bot risk tolerance standards. Proceeding to market evaluation.")
|
|
140
|
+
```
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
README.md
|
|
2
|
+
pyproject.toml
|
|
3
|
+
TradeAssist.egg-info/PKG-INFO
|
|
4
|
+
TradeAssist.egg-info/SOURCES.txt
|
|
5
|
+
TradeAssist.egg-info/dependency_links.txt
|
|
6
|
+
TradeAssist.egg-info/entry_points.txt
|
|
7
|
+
TradeAssist.egg-info/requires.txt
|
|
8
|
+
TradeAssist.egg-info/top_level.txt
|
|
9
|
+
app/__init__.py
|
|
10
|
+
app/config.py
|
|
11
|
+
app/history_manager.py
|
|
12
|
+
app/main.py
|
|
13
|
+
app/settings_manager.py
|
|
14
|
+
app/backend/__init__.py
|
|
15
|
+
app/backend/analyzer.py
|
|
16
|
+
app/backend/data_models.py
|
|
17
|
+
app/backend/gemini_client.py
|
|
18
|
+
app/backend/sec_client.py
|
|
19
|
+
app/gui/__init__.py
|
|
20
|
+
app/gui/main_window.py
|
|
21
|
+
app/gui/worker.py
|
|
22
|
+
app/gui/components/__init__.py
|
|
23
|
+
app/gui/components/filing_panel.py
|
|
24
|
+
app/gui/components/prompt_panel.py
|
|
25
|
+
app/gui/components/results_panel.py
|
|
26
|
+
app/gui/components/saved_analyses_dialog.py
|
|
27
|
+
app/gui/components/settings_dialog.py
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
google-genai>=2.23.0
|
|
2
|
+
pydantic>=2.13.5
|
|
3
|
+
PyQt6>=6.11.0
|
|
4
|
+
PyQt6-Qt6>=6.11.2
|
|
5
|
+
PyQt6_sip>=13.12.0
|
|
6
|
+
pandas>=2.3.3
|
|
7
|
+
numpy>=1.26.4
|
|
8
|
+
yfinance>=1.7.0
|
|
9
|
+
finnhub-python>=2.4.29
|
|
10
|
+
beautifulsoup4>=4.15.0
|
|
11
|
+
lxml>=6.1.3
|
|
12
|
+
curl_cffi>=0.16.3
|
|
13
|
+
peewee>=4.5.1
|
|
14
|
+
websockets>=16.1.1
|
|
15
|
+
requests>=2.34.2
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
app
|