A Python-based web application that daily scrapes Zacks Bull of the Day recommendations, tracks stock performance metrics from recommendation dates, and analyzes analyst performance.
- Daily Scraping: Automatically scrapes new Zacks Bull of the Day recommendations
- Performance Tracking: Calculates growth metrics (4W, 13W, 6M, 1Y, YTD) from recommendation date
- Analyst Performance: Tracks and ranks analysts by their recommendation success rates
- Multiple Recommendations: Handles stocks recommended multiple times with timeline view
- Sector Categorization: Filter and analyze by sector
- Web Dashboard: Interactive dashboard with filtering and search
- Extensible Metrics: Easy to add new metrics via configuration
- Python 3.9 or higher
- Internet connection
- ~500MB disk space
cd "c:\Users\usdoss02\Satish-Playground\zach bull"pip install -r requirements.txtNote: Selenium requires ChromeDriver. Selenium 4.6+ will automatically download it, but you need Google Chrome browser installed. See docs/SELENIUM_SETUP.md for details.
python -c "import yfinance; import flask; print('Dependencies installed successfully!')"The database will be created automatically on first run. You can also test it:
python -c "from src.data_manager import DataManager; dm = DataManager('./data/recommendations.db'); print('Database initialized!')"python run_daily.pyThis will:
- Scrape new recommendations from Zacks
- Fetch stock prices and calculate metrics
- Save everything to the database
- Update analyst performance stats
python app.pyThen open your browser to: http://localhost:5000
Edit config/config.yaml to customize:
- Scraping settings: URLs, rate limits, retries
- Growth metrics: Enable/disable periods, adjust days
- Additional metrics: Add new metrics from yfinance
- Web server: Host, port, debug mode
- Open Task Scheduler
- Create Basic Task
- Name: "Zacks Bull Tracker Daily"
- Trigger: Daily at 9:00 AM
- Action: Start a program
- Program:
python - Arguments:
C:\Users\usdoss02\Satish-Playground\zach bull\run_daily.py - Start in:
C:\Users\usdoss02\Satish-Playground\zach bull
crontab -eAdd this line (runs daily at 9 AM):
0 9 * * * cd /path/to/zach-bull && /usr/bin/python3 run_daily.py >> logs/cron.log 2>&1
zach-bull/
├── config/ # Configuration files
├── src/ # Python source code
│ ├── scraper.py # Web scraper
│ ├── stock_analyzer.py # Stock price & metrics
│ ├── analyst_tracker.py # Analyst performance
│ ├── data_manager.py # Database operations
│ ├── main.py # Daily orchestration
│ ├── api/ # API routes
│ └── metrics/ # Extensible metrics system
├── web/ # Frontend
│ ├── templates/ # HTML templates
│ └── static/ # CSS, JS
├── data/ # Database and logs
├── reports/ # Generated reports
└── run_daily.py # Daily job entry point
- Start server:
python app.py - Open browser:
http://localhost:5000 - Use filters to find stocks
- Click on stocks to see detailed timeline
- View analyst performance pages
GET /api/stocks- List all stocks (with filters)GET /api/stocks/<symbol>- Stock detailGET /api/analysts- List all analystsGET /api/analysts/<name>- Analyst detailGET /api/sectors- List all sectorsGET /api/metrics- Available metrics
# Run daily job manually
python run_daily.py
# Start web server
python app.pyEdit config/config.yaml:
additional_metrics:
metrics:
- name: "new_metric"
source: "yfinance"
field: "fieldName"
label: "Display Label"
type: "float"
enabled: trueThe metric will automatically appear in the API and frontend!
Important: Zacks website uses bot protection. The scraper now uses Selenium by default to bypass this.
If Selenium fails:
- Install ChromeDriver: See
docs/SELENIUM_SETUP.mdfor installation instructions - Check Chrome version: Make sure Chrome browser is installed and updated
- Manual entry: Manually add sample data for testing (see
docs/SCRAPING_NOTES.md)
See docs/SELENIUM_SETUP.md for Selenium setup and troubleshooting.
- Check internet connection
- Verify Zacks website is accessible
- Check rate limiting settings in config
- Check if bot protection is blocking requests (see
docs/SCRAPING_NOTES.md)
- Symbol might be incorrect
- Stock might be delisted
- Check yfinance API status
- Ensure data directory exists
- Check file permissions
- Verify SQLite is working
- Check if port 5000 is available
- Verify Flask is installed
- Check config.yaml syntax
# Run all tests (when implemented)
python -m pytest tests/- scraper.py: Handles web scraping with BeautifulSoup
- stock_analyzer.py: Fetches prices and calculates metrics using yfinance
- data_manager.py: SQLite database operations
- analyst_tracker.py: Calculates analyst performance
- main.py: Orchestrates daily workflow
- app.py: Flask web application
- Database: SQLite file at
data/recommendations.db - Logs:
data/daily_logs/app.log - Reports:
reports/analyst_performance/YYYY-MM-DD.txt
- Daily job: Typically 5-15 minutes
- Database size: Grows with recommendations (~1KB per recommendation)
- Web server: Handles 100+ concurrent requests
- No authentication required (local use)
- Web scraping respects rate limits
- No sensitive data stored
- For production: Add authentication, use HTTPS
This project is for personal/educational use.
For issues or questions:
- Check logs in
data/daily_logs/app.log - Review configuration in
config/config.yaml - Verify all dependencies are installed
- Run daily job to collect data
- Access dashboard to view results
- Customize metrics in config.yaml
- Add features as needed
Happy Tracking! 📈