An AI-powered market analysis app — built with Python, PySide6 & FastAPI — that charts gold, forex, crypto, stocks and indices, and adds a Groq LLM technical verdict (bullish / bearish / neutral) on top. Ships as both a desktop app and a web dashboard, fully bilingual (Turkish/English).
Python, PySide6 ve FastAPI ile geliştirilmiş, yapay zeka destekli bir piyasa analiz uygulaması — altın, döviz, kripto, hisse ve endeksleri grafikler, üzerine bir Groq LLM'in teknik yorumunu (yükseliş / düşüş / nötr) ekler. Hem masaüstü uygulaması hem web dashboard'u olarak çalışır, tamamen Türkçe/İngilizce iki dillidir.
AI Trading Assistant is an app that analyzes the price action of gold, forex pairs, cryptocurrencies, stocks and indices through a modern, dark-themed interface. Every asset is charted as a candlestick chart with SMA20/SMA50 overlays and a volume panel; on top of that, the app computes a set of technical indicators (RSI, MACD, Bollinger Bands, support/resistance) and sends them to a Groq-hosted LLM (core/ai_analyst.py), which acts as a technical analyst — returning a bullish/bearish/neutral verdict, a confidence score, a written rationale, key support/resistance levels and a risk note. The app runs either as a native desktop window (PySide6) or as a web dashboard (FastAPI + vanilla JS) — a launcher screen lets you pick either, and both share the exact same analysis engine. The entire UI, including the AI output, is bilingual and switches instantly between Turkish and English.
Free, keyless market data (core/data_fetcher.py)
- Pulls OHLCV candles and live quotes from Yahoo Finance via
yfinance— no API key, no rate-limit hassle - 31 default assets across 5 categories: Commodities (Gold, Silver, Platinum, WTI, Brent, Natural Gas), Forex (EUR/USD, GBP/USD, USD/TRY, USD/JPY, USD/CHF, AUD/USD, USD/CAD, EUR/TRY), Crypto (BTC, ETH, SOL, XRP, DOGE, BNB, ADA, AVAX), Stocks (AAPL, MSFT, GOOGL, AMZN, TSLA, NVDA) and Indices (S&P 500, Nasdaq 100, Dow Jones)
- 5 timeframes (15m / 1H / 4H / 1D / 1W) — 4H and 1W candles are resampled locally from 1H/1D data
Technical analysis engine (core/indicators.py)
- RSI(14), MACD (with signal-line crossover), SMA20/SMA50 trend detection, Bollinger Bands, and support/resistance from recent swing highs/lows — computed with
ta+pandas
AI market analyst (core/ai_analyst.py)
- Sends the computed indicator snapshot (not raw price history) to a Groq model and asks it to act as a technical analyst, not a financial advisor
- Returns a structured verdict —
BULLISH/BEARISH/NEUTRAL, a 0-100 confidence score, a short written summary, bullet-point reasoning, support/resistance levels and a one-line risk note — localized in whichever UI language is active - Every analysis is saved to a local history log (
core/history.py), shared between the desktop app and the web dashboard
Two front-ends, one engine
- Desktop app (
ui/) — a PySide6 window with a categorized watchlist sidebar, a matplotlib candlestick chart, and an AI analysis panel - Web dashboard (
web/) — a FastAPI backend serving a dependency-free HTML/CSS/JS single-page app with its own hand-rolled<canvas>candlestick renderer (no charting library, no Node.js build step) launcher.py— the recommended entry point: a small chooser screen that lets you start either the desktop window or the web dashboard (opens your browser automatically)
Bilingual by design (i18n.py)
- Every label, button, status message and AI-generated verdict is looked up through a shared TR/EN string table
- One click switches the whole app (desktop or web) instantly, no restart needed
- Python 3 — core language
- PySide6 (Qt) — native desktop GUI
- FastAPI + Uvicorn — web backend for the browser dashboard
- HTML / CSS / vanilla JS — web front-end, zero build step
- yfinance — free, keyless market data (Yahoo Finance)
- pandas + ta — OHLCV handling and technical indicators (RSI, MACD, Bollinger, SMA/EMA)
- matplotlib — candlestick + volume charts in the desktop app
- Groq API — LLM-based technical analysis verdicts
- python-dotenv — loads the Groq API key from environment variables
Watchlist sidebar, candlestick chart with SMA20/50 + volume, and the AI market analysis panel — all in English.
launcher.py— the main entry point; shows the "Desktop App / Web Dashboard" chooser screen and starts whichever you pickdesktop_app.py— launches the PySide6 window directly, skipping the chooserconfig.py— the watchlist, timeframes, categories and language constants shared by both front-endsi18n.py— the flat TR/EN string table, looked up throught(key, lang)core/— the shared, UI-agnostic engine:data_fetcher.py— yfinance OHLCV & quote fetchingindicators.py— RSI/MACD/SMA/Bollinger/support-resistance calculationsai_analyst.py— builds the Groq prompt and parses its JSON verdicthistory.py— persists past analyses to disk
ui/— the PySide6 desktop interface (sidebar, chart widget, analysis panel, theme, background workers)web/— the FastAPI backend (server.py) and the static HTML/CSS/JS dashboard (static/)
Secrets (the Groq API key) are read from environment variables via python-dotenv — see Usage below.
AI-Trading-Assistant/
├── launcher.py # Entry point - Desktop/Web chooser screen
├── desktop_app.py # Direct desktop app entry (skips the chooser)
├── config.py # Watchlist, timeframes, categories, language constants
├── i18n.py # TR/EN UI string table
├── core/
│ ├── data_fetcher.py # yfinance OHLCV & price fetching
│ ├── indicators.py # RSI, MACD, SMA/EMA, Bollinger, support/resistance
│ ├── ai_analyst.py # Groq prompt building & response parsing
│ └── history.py # Analysis history persistence
├── ui/ # PySide6 desktop interface
│ ├── main_window.py
│ ├── sidebar.py
│ ├── chart_widget.py
│ ├── analysis_panel.py
│ ├── widgets.py
│ ├── theme.py
│ ├── language.py
│ └── workers.py
├── web/ # FastAPI web interface
│ ├── server.py
│ └── static/
│ ├── index.html
│ ├── style.css
│ └── app.js
├── img/ # Screenshots used in this README
├── .env.example # Template for GROQ_API_KEY
├── .gitignore
├── requirements.txt
├── LICENSE
└── README.md
-
Clone the repository
git clone https://github.com/<your-username>/AI-Trading-Assistant.git cd AI-Trading-Assistant
-
Create a virtual environment and install dependencies (Python 3.10+ recommended)
python -m venv .venv .venv\Scripts\activate # Windows pip install -r requirements.txt
-
Copy
.env.exampleto.envand set your own free Groq API key from console.groq.com:copy .env.example .env
No other API key is needed — market data is fetched for free from Yahoo Finance.
-
Run it
python launcher.py
Pick Desktop App or Web Dashboard from the chooser screen. In the app, pick an asset from the sidebar, choose a timeframe, and click "Analyze".
To skip the chooser and always open the desktop window:
python desktop_app.py
- Fork the repository
- Create a new branch
- Commit your changes
- Push the branch
- Open a pull request
This project is licensed under the MIT License.
AI Trading Assistant, altın, döviz paritesi, kripto para, hisse senedi ve endekslerin fiyat hareketlerini modern, koyu temalı bir arayüz üzerinden analiz eden bir uygulamadır. Her varlık, SMA20/SMA50 çizgileri ve hacim paneli içeren bir mum grafiği olarak çizilir; bunun üzerine uygulama bir dizi teknik indikatör (RSI, MACD, Bollinger Bantları, destek/direnç) hesaplar ve bunları bir Groq LLM'e (core/ai_analyst.py) gönderir — model bir teknik analist gibi davranarak yükseliş/düşüş/nötr kararı, bir güven skoru, yazılı bir gerekçe, temel destek/direnç seviyeleri ve bir risk notu üretir. Uygulama ister yerel bir masaüstü penceresi (PySide6) ister bir web dashboard'u (FastAPI + düz JS) olarak çalışır — bir başlangıç seçim ekranı ikisinden birini seçmenizi sağlar ve ikisi de tamamen aynı analiz motorunu paylaşır. AI çıktısı dahil arayüzün tamamı iki dillidir ve Türkçe/İngilizce arasında anında geçiş yapar.
Ücretsiz, API anahtarı gerektirmeyen piyasa verisi (core/data_fetcher.py)
yfinanceüzerinden Yahoo Finance'ten OHLCV mumları ve anlık fiyatlar çekilir — API anahtarı yok, kredi/rate-limit derdi yok- 5 kategoride 31 varsayılan varlık: Emtia (Altın, Gümüş, Platin, WTI, Brent, Doğalgaz), Forex (EUR/USD, GBP/USD, USD/TRY, USD/JPY, USD/CHF, AUD/USD, USD/CAD, EUR/TRY), Kripto (BTC, ETH, SOL, XRP, DOGE, BNB, ADA, AVAX), Hisse Senedi (AAPL, MSFT, GOOGL, AMZN, TSLA, NVDA) ve Endeks (S&P 500, Nasdaq 100, Dow Jones)
- 5 zaman aralığı (15D / 1S / 4S / 1G / 1H) — 4 saatlik ve haftalık mumlar 1 saatlik/günlük veriden yerel olarak yeniden örneklenir
Teknik analiz motoru (core/indicators.py)
- RSI(14), MACD (sinyal çizgisi kesişimiyle), SMA20/SMA50 trend tespiti, Bollinger Bantları ve son tepe/dip noktalarından destek/direnç —
ta+pandasile hesaplanır
AI piyasa analisti (core/ai_analyst.py)
- Hesaplanan indikatör özetini (ham fiyat geçmişini değil) bir Groq modeline gönderir ve modelden bir finansal danışman değil bir teknik analist gibi davranmasını ister
- Yapılandırılmış bir karar döndürür —
YÜKSELİŞ/DÜŞÜŞ/NÖTR, 0-100 arası güven skoru, kısa yazılı özet, madde madde gerekçe, destek/direnç seviyeleri ve tek satırlık risk notu — aktif arayüz diline göre yerelleştirilmiş olarak - Her analiz, masaüstü uygulaması ile web dashboard'u arasında paylaşılan yerel bir geçmiş kaydına (
core/history.py) kaydedilir
İki arayüz, tek motor
- Masaüstü uygulaması (
ui/) — kategorilere ayrılmış bir izleme listesi kenar çubuğu, bir matplotlib mum grafiği ve bir AI analiz paneli içeren PySide6 penceresi - Web dashboard'u (
web/) — bağımlılıksız bir HTML/CSS/JS tek sayfa uygulaması sunan bir FastAPI backend'i, kendi elle yazılmış<canvas>mum grafiği çizicisiyle (harici grafik kütüphanesi yok, Node.js build adımı yok) launcher.py— önerilen başlangıç noktası: masaüstü penceresini mi yoksa web dashboard'unu mu (tarayıcınızı otomatik açar) başlatacağınızı seçtiren küçük bir seçim ekranı
Tasarımdan gelen iki dillilik (i18n.py)
- Her etiket, buton, durum mesajı ve AI tarafından üretilen karar, ortak bir TR/EN metin tablosundan okunur
- Tek bir tıkla tüm uygulama (masaüstü veya web) anında dil değiştirir, yeniden başlatma gerekmez
- Python 3 — ana dil
- PySide6 (Qt) — yerel masaüstü arayüzü
- FastAPI + Uvicorn — tarayıcı dashboard'u için web backend'i
- HTML / CSS / düz JS — web arayüzü, sıfır build adımı
- yfinance — ücretsiz, API anahtarsız piyasa verisi (Yahoo Finance)
- pandas + ta — OHLCV işleme ve teknik indikatörler (RSI, MACD, Bollinger, SMA/EMA)
- matplotlib — masaüstü uygulamasında mum + hacim grafikleri
- Groq API — LLM tabanlı teknik analiz kararları
- python-dotenv — Groq API anahtarını ortam değişkenlerinden yükler
İzleme listesi kenar çubuğu, SMA20/50 çizgili mum grafiği ve hacim paneli, ve AI piyasa analiz paneli — hepsi Türkçe.
launcher.py— ana giriş noktası; "Masaüstü Programı / Web Arayüzü" seçim ekranını gösterir ve seçileni başlatırdesktop_app.py— seçim ekranını atlayıp doğrudan PySide6 penceresini açarconfig.py— her iki arayüz tarafından paylaşılan izleme listesi, zaman aralıkları, kategoriler ve dil sabitlerii18n.py—t(key, lang)üzerinden okunan düz TR/EN metin tablosucore/— arayüzden bağımsız, paylaşılan motor:data_fetcher.py— yfinance OHLCV ve fiyat çekmeindicators.py— RSI/MACD/SMA/Bollinger/destek-direnç hesaplamalarıai_analyst.py— Groq prompt'unu oluşturur ve JSON kararını ayrıştırırhistory.py— geçmiş analizleri diske kaydeder
ui/— PySide6 masaüstü arayüzü (kenar çubuğu, grafik bileşeni, analiz paneli, tema, arka plan işçileri)web/— FastAPI backend'i (server.py) ve statik HTML/CSS/JS dashboard'u (static/)
Gizli bilgiler (Groq API anahtarı) python-dotenv ile ortam değişkenlerinden okunur — aşağıdaki Kullanım bölümüne bakın.
AI-Trading-Assistant/
├── launcher.py # Giriş noktası - Masaüstü/Web seçim ekranı
├── desktop_app.py # Doğrudan masaüstü girişi (seçim ekranını atlar)
├── config.py # İzleme listesi, zaman aralıkları, kategoriler, dil sabitleri
├── i18n.py # TR/EN arayüz metin tablosu
├── core/
│ ├── data_fetcher.py # yfinance OHLCV ve fiyat çekme
│ ├── indicators.py # RSI, MACD, SMA/EMA, Bollinger, destek/direnç
│ ├── ai_analyst.py # Groq prompt oluşturma & yanıt ayrıştırma
│ └── history.py # Analiz geçmişi kalıcılığı
├── ui/ # PySide6 masaüstü arayüzü
│ ├── main_window.py
│ ├── sidebar.py
│ ├── chart_widget.py
│ ├── analysis_panel.py
│ ├── widgets.py
│ ├── theme.py
│ ├── language.py
│ └── workers.py
├── web/ # FastAPI web arayüzü
│ ├── server.py
│ └── static/
│ ├── index.html
│ ├── style.css
│ └── app.js
├── img/ # Bu README'de kullanılan ekran görüntüleri
├── .env.example # GROQ_API_KEY için şablon
├── .gitignore
├── requirements.txt
├── LICENSE
└── README.md
-
Depoyu klonlayın
git clone https://github.com/<kullanici-adiniz>/AI-Trading-Assistant.git cd AI-Trading-Assistant
-
Sanal ortam oluşturup bağımlılıkları kurun (Python 3.10+ önerilir)
python -m venv .venv .venv\Scripts\activate # Windows pip install -r requirements.txt
-
.env.exampledosyasını.envolarak kopyalayıp console.groq.com üzerinden aldığınız ücretsiz Groq API anahtarınızı girin:copy .env.example .env
Başka hiçbir API anahtarına gerek yok — piyasa verisi Yahoo Finance'ten ücretsiz çekilir.
-
Çalıştırın
python launcher.py
Seçim ekranından Masaüstü Programı veya Web Arayüzü'nü seçin. Uygulamada kenar çubuğundan bir varlık seçin, bir zaman aralığı belirleyin ve "Analiz Et" butonuna tıklayın.
Seçim ekranını atlayıp her zaman masaüstü penceresini açmak için:
python desktop_app.py
- Projeyi fork'layın
- Yeni bir branch oluşturun
- Değişikliklerinizi commit edin
- Branch'i push edin
- Pull request oluşturun
Bu proje MIT Lisansı ile lisanslanmıştır.


