TradeAssist: Gemini SEC Filing Analyzer
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.
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.
Project Directory Structure
TradeAssist/
├── app/ # Main application package
│ ├── __init__.py # Package entry point
│ ├── config.py # Central configurations (API keys, logging, SEC headers)
│ │
│ ├── backend/ # Pure Python backend (NO PyQt dependencies)
│ │ ├── __init__.py
│ │ ├── data_models.py # Pydantic schemas for Gemini structured JSON outputs
│ │ ├── sec_client.py # SEC EDGAR client (CIK mapping, listing & downloading filings)
│ │ ├── gemini_client.py # Google GenAI wrapper with exponential rate-limit retries
│ │ └── analyzer.py # Coordinating core engine coupling Gemini and SEC
│ │
│ ├── gui/ # PyQt6 User Interface package
│ │ ├── __init__.py
│ │ ├── main_window.py # Main window orchestrating components & worker threads
│ │ ├── worker.py # Asynchronous QThread workers (keeps GUI responsive)
│ │ └── components/ # Reusable GUI widgets
│ │ ├── __init__.py
│ │ ├── filing_panel.py # Search, list, select filings; toggle bot scan mode
│ │ ├── prompt_panel.py # Model configuration (temperature, schema, custom/preset prompts)
│ │ └── results_panel.py # Dynamic HTML renderer for structured/text results
│ │
│ └── main.py # Graphical App entry point (QApplication)
│
├── sec.py # [Reference] Original single-file bot implementation
├── requirements.txt # Python library dependencies
└── README.md # This documentation file
Features
- Two Core Analysis Modes:
- 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).
- 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.
- Strict Structured JSON Responses: Uses Pydantic schemas (under
data_models.py) coupled with Gemini'sresponse_schemamode to guarantee output structure for bot pipelines. - Decoupled Backend Engine: Built cleanly using the official new
google-genaiSDK, ready to be dropped into any script. - Asynchronous Multi-threading: SEC scraping and Gemini inference runs in native PyQt background threads to ensure the UI remains fully responsive.
- Modern styling: Uses the polished Fusion desktop palette and rich-HTML color-coded results cards for analysis ratings.
Setup & Running
1. Install Dependencies
Ensure you have a Python 3.11+ environment active, then install the required libraries:
pip install -r requirements.txt
2. Set Your API Keys
Ensure your Gemini API key is configured in your environment:
# Windows PowerShell
$env:GEMINI_API_KEY="your-gemini-api-key-here"
# Windows Command Prompt
set GEMINI_API_KEY=your-gemini-api-key-here
3. Run the GUI App
Launch the main dashboard:
python -m app.main
Drop-in Integration: Plugging Into Your Trading Bot
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!
Here is a simple example showing how to plug it in:
import os
from app.backend.analyzer import GeminiSecAnalyzer
from app.backend.data_models import StockAnalysis
# 1. Initialize analyzer (it picks up GEMINI_API_KEY from environment)
analyzer = GeminiSecAnalyzer()
# 2. Run the comprehensive bot scan on a ticker (returns strict StockAnalysis pydantic model)
result: StockAnalysis = analyzer.analyze_ticker_comprehensive("TSLA")
# 3. Read the structured scores and trigger bot decisions!
print(f"News Score: {result.news_score}/10")
print(f"SEC Filing Score: {result.SEC_score}/10")
print(f"Dilution Risk: {result.dilution_score}/10")
print(f"Cash Burn Risk: {result.cash_burn_score}/10")
if result.dilution_score > 7 or result.cash_burn_score > 8:
print("⚠️ WARNING: High risk detected! Aborting stock purchasing pipeline.")
else:
print("✅ Target meets bot risk tolerance standards. Proceeding to market evaluation.")
Metadata
Release files for TradeAssist 0.7.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| tradeassist-0.7.0.tar.gz | 42.7 kB | With provenance | Details for tradeassist-0.7.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| tradeassist-0.7.0-py3-none-any.whl | Python 3 | none | any | Details for tradeassist-0.7.0-py3-none-any.whl |
Total release size: 94.3 kB
Release files / tradeassist-0.7.0.tar.gz
| Download URL | tradeassist-0.7.0.tar.gz |
|---|---|
| Size | 42.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c0676b851a2616615532a5590c0e1df6b50c5d700bd53e95bc3a76092c80a6dc
|
|
BLAKE2b-256 checksum How to use checksums |
b7a1434e670febc4a1a8c0a7ac13c7f808bb4a9b7db922f0b1ef89cf33c8a249
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 18, 2026.
Transparency logRelease files / tradeassist-0.7.0-py3-none-any.whl
| Download URL | tradeassist-0.7.0-py3-none-any.whl |
|---|---|
| Size | 51.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0af76813e6a49bb8617a619f35e746301a86bf47452ab637637cea516b44041c
|
|
BLAKE2b-256 checksum How to use checksums |
06cc9cb78957ac6a6167b55affafadf013b7fe1b5422ac9bc0643245c254f18b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 18, 2026.
Transparency logSecurity for TradeAssist 0.7.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for tradeassist-0.7.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 18, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.