# MetaQuant Nigeria π
A local-first desktop stock screener for the Nigerian Stock Exchange (NGX) with real-time market data, microstructure analysis, portfolio tracking, and AI-powered insights.
## β¨ Features
### π΄ Live Market View (NEW)
- **Real-time prices** from TradingView (143 NGX stocks)
- **Sector Heatmap** - Click to drill-down into any sector
- **Market Breadth** - Advancers vs decliners visual bar
- **Top Movers** - Dynamic gainers and losers
- **Volume Leaders** - Stocks with unusual activity
- **Auto-refresh** every 60 seconds
### π
History Tab
- View historical market data by date (Dec 2023 - Present)
- Accurate day-over-day change calculations
- Top gainers/losers for any historical date
- Volume and performance metrics
### π Stock Screener
- Filter by P/E ratio, dividend yield, market cap, sector
- Sortable columns with visual indicators
- Click any stock for detailed technicals
### πΌ Portfolio & Watchlist
- Track positions and calculate P&L
- Set price targets and alerts
- Performance analytics
### π€ AI Insights
- Stock analysis using Ollama (local) or Groq (cloud)
- Technical indicator interpretation
- Buy/Sell/Hold recommendations
---
## π Tech Stack
| Component | Technology |
|-----------|------------|
| **GUI** | Tkinter + ttkbootstrap (dark theme) |
| **Database** | DuckDB (columnar analytics) |
| **Real-time Data** | `tradingview-screener` |
| **Historical Data** | `tvdatafeed` (Python 3.12) |
| **Technical Analysis** | `tradingview-ta` |
| **AI** | Ollama / Groq API |
---
## π Installation
```bash
# Clone the repository
git clone
github.com
cd MetaQuantNigeria
# Create virtual environment
python3 -m venv .venv
source .venv/bin/activate
# Install dependencies
pip install -r requirements.txt
# Install TradingView packages
pip install tradingview-screener tradingview-ta
# Run the application
python main.py
```
---
## π Data Collection
### How It Works
1. **Real-time Data**: `tradingvi β¦