A comprehensive Flask application for financial data analysis and visualization of coffee and beverage companies.
- Multi-source financial data with automatic fallbacks (Finnhub → Yahoo Finance → Hardcoded)
- Real-time stock tracking with technical indicators and earnings analysis
- Sentiment analysis of financial news using NLTK
- Interactive Plotly dashboards with responsive design
- Smart caching and automated ETL pipelines
- Performance-optimized database with intelligent indexing
- CSV export and multi-stock comparison views
- Python 3.10+
- PostgreSQL (recommended) or SQLite
- API Keys: Finnhub, Alpha Vantage
git clone https://github.com/mseijse01/finance-integration.git
cd finance-integration
python -m venv venv && source venv/bin/activate
pip install -r requirements.txt
python utils/setup_nltk.py
# Setup environment
cp .env.example .env
# Edit .env with your API keys and database URL
# Initialize and run
flask run-etl
python app.py
# Access dashboard at http://localhost:5000Coffee & Beverage Companies: SBUX, KDP, BROS, FARM
Add new symbols to coffee_stocks list in views/dashboard.py
# Manual ETL runs
python scripts/schedule_etl.py --run-once # All stocks
python scripts/schedule_etl.py --run-once --symbols SBUX # Single stock
# Check data freshness
python scripts/schedule_etl.py --check-freshness
# Set up automated daily updates
python scripts/schedule_etl.py --create-cron# Add database indexes for faster queries (50-70% improvement)
python scripts/add_performance_indexes.py
# Migrate database schema if needed
python scripts/migrate_database_schema.pydocker build -t finance-integration .
docker run -p 8000:5000 --env-file .env finance-integrationexport DATABASE_URL=postgresql://user:pass@host:5432/finance_db
export FINNHUB_API_KEY=your_key
export ALPHA_VANTAGE_API_KEY=your_key
python app.py- Service Architecture - BaseDataService pattern and intelligent fallbacks
- Technology Stack - Technology choices and rationale
- Quick Start Guide - Comprehensive usage guide
- Automated ETL scheduling system with cron integration
- Database performance optimization with intelligent indexing (50-70% faster queries)
- Modular chart utilities for improved code organization
- Enhanced service architecture with BaseDataService pattern
This project is licensed under the MIT License - see the LICENSE file for details.
Report Bug • Request Feature • Documentation • Quick Start Guide