An AI-powered, on-demand stock analysis platform hosted on GitHub Pages. Analyze major IDX, US, and Crypto assets with real-time recommendations powered by Qwen 2.5 GGUF (CPU-optimized local model).
-
Automated Top Stock Analysis
- Runs manually via GitHub Actions
- Analyzes 50+ predefined major assets (IDX, US, Crypto)
- Generates comprehensive AI-driven recommendations
- Outputs results to
data.json
-
Search in Cache
- Search any stock directly on the website
- Instant results from cached
data.json - Add more stocks by updating watchlist and running workflow
- β Free & Local: Powered by Qwen 2.5 - 1.5B Instruct GGUF (CPU-optimized)
- β No API Keys: Everything runs locally
- β Fast CPU Inference: GGUF quantization for speed
- β GitHub Actions Ready: Works perfectly on free GitHub runners
- β Automated Scanning: GitHub Actions workflow
- β Interactive UI: Tailwind CSS + Alpine.js
- β Smart Filtering: Strong Buys, Dividend Gems, Scalp/Day Trade
- β No Rate Limits: Unlimited analysis
- β Dividend Insights: Yield analysis for income investors
- β News Integration: Latest market news for each stock
- β Technical Analysis: RSI, MACD, SMA, ATR
- GitHub account
- Python 3.10+ (for local testing)
- 4GB+ RAM (GGUF model uses ~2GB)
- 2GB free disk space
git clone https://github.com/YOUR_USERNAME/StockSentinel.git
cd StockSentinel# Create virtual environment
python -m venv venv
# Activate (Windows)
venv\Scripts\activate
# Activate (Linux/Mac)
source venv/bin/activate
# Install dependencies
pip install -r requirements.txtNote: First time will download Qwen model (~3GB). This is automatic.
- Go to Settings β Pages
- Source: Deploy from a branch
- Branch:
main(ormaster) - Folder:
/docs - Click Save
- Go to Actions tab in your repository
- Click Manual Stock Analysis Scan workflow
- Click Run workflow
- Select branch (usually
main) - Click Run workflow
The workflow will:
- Install dependencies
- Fetch data for all watchlist stocks
- Analyze each with Gemini AI
- Generate
docs/data.json - Commit and push results
- Update live website automatically
# Install dependencies
pip install -r requirements.txt
# Run analysis (model downloads automatically first time)
python main.pyFirst run: Model downloads (~3GB), takes 10-15 minutes
Subsequent runs: Model loads from cache, much faster
Visit your GitHub Pages URL:
https://YOUR_USERNAME.github.io/StockSentinel/
StockSentinel/
βββ .github/
β βββ workflows/
β βββ manual_scan.yml # GitHub Actions workflow
βββ docs/ # GitHub Pages root
β βββ index.html # Main HTML
β βββ script.js # Frontend logic
β βββ data.json # Generated stock data
βββ main.py # Backend analysis script
βββ requirements.txt # Python dependencies
βββ README.md # This file
Edit the WATCHLIST array in main.py:
WATCHLIST = [
# Add your favorite stocks
"AAPL",
"TSLA",
"BBCA.JK",
"BTC-USD",
# ... more tickers
]Default: 4 seconds between API calls (15 RPM free tier)
Edit in main.py:
time.sleep(4) # Change to your desired delayEdit in docs/script.js:
const RATE_LIMIT_DELAY = 4000; // millisecondsEdit .github/workflows/manual_scan.yml:
on:
workflow_dispatch: # Manual trigger
schedule:
- cron: '0 0 * * *' # Daily at midnight UTC
# - cron: '0 */6 * * *' # Every 6 hours
# - cron: '0 9 * * 1-5' # Weekdays at 9 AM UTCdocs/data.json structure:
{
"last_updated": "2026-01-19T10:30:00",
"total_assets": 45,
"assets": [
{
"ticker": "AAPL",
"current_price": 185.50,
"recommendation": "Strong Buy",
"confidence_score": 85,
"time_horizon": "Position (Weeks-Months)",
"reasoning": "Strong technical indicators...",
"entry_zone": "$180-$185",
"take_profit": "$200",
"stop_loss": "$175",
"dividend_yield": 0.52,
"dividend_analysis": "Consistent dividend payer",
"rsi": 58.5,
"macd": 1.25,
"macd_signal": 0.85,
"sma_20": 182.30,
"sma_50": 178.60,
"atr": 3.45,
"volume": 52000000,
"news": [
{
"title": "Apple announces new...",
"url": "https://...",
"snippet": "..."
}
],
"last_updated": "2026-01-19T10:25:00"
}
]
}- All Stocks: View complete watchlist
- Strong Buys: High-confidence buy recommendations
- Dividend Gems: Stocks with >2% yield
- Scalp/Day Trade: Short-term opportunities
- Enter any ticker symbol (e.g., AAPL, BBCA.JK, BTC-USD)
- If cached β Instant results
- If not cached β Live Gemini analysis
- Rate-limited to prevent API abuse
- Color-coded recommendations
- Key metrics (RSI, Dividend, etc.)
- Entry/TP/SL levels
- Click for detailed analysis
- Requests: 15 per minute (RPM)
- Daily: 1,500 requests
- Rate limiting: Built-in 4-second delays
Tips:
- Don't exceed watchlist of ~100 stocks per run
- Schedule scans wisely (daily or less frequent)
- Monitor your API usage at Google AI Studio
- Check Actions tab is enabled in repository settings
- Verify
GEMINI_API_KEYsecret exists - Check workflow file syntax
- Verify
docs/data.jsonexists - Check GitHub Pages is enabled
- Check browser console for errors
- Ensure API key is configured in
script.js
- Reduce watchlist size
- Increase delay in
main.pyandscript.js - Wait before running again
- Verify ticker symbol is correct (use Yahoo Finance format)
- Check if market is open (for real-time data)
- Some stocks may not have all data fields
Edit main.py:
hist['BB_Upper'] = ta.volatility.BollingerBands(hist['Close']).bollinger_hband()
hist['Stochastic'] = ta.momentum.StochasticOscillator(hist['High'], hist['Low'], hist['Close']).stoch()Edit the prompt in main.py and docs/script.js to:
- Add more analysis criteria
- Change output format
- Include specific trading strategies
Use GitHub Actions to send emails on:
- Strong Buy signals
- High dividend finds
- Specific conditions
MIT License - Feel free to use and modify!
This platform is for educational and informational purposes only.
- Not financial advice
- Past performance β future results
- Always do your own research (DYOR)
- Consult a licensed financial advisor
- Trade at your own risk
Contributions welcome! Please:
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
Issues? Questions?
- Open a GitHub Issue
- Check existing issues first
- Provide detailed error messages
- Google Gemini: AI-powered analysis
- Yahoo Finance: Market data via
yfinance - DuckDuckGo: News search
- Tailwind CSS: Beautiful UI
- Alpine.js: Reactive frontend
Happy Trading! ππ°
Remember: The best investment is the one you understand. Stay informed, stay cautious, and never invest more than you can afford to lose.