Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

mseijse01/finance-integration

Repository files navigation

Finance Integration Dashboard

A comprehensive Flask application for financial data analysis and visualization of coffee and beverage companies.

Python Flask SQLAlchemy License

Features

  • 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

Quick Start

Prerequisites

Installation

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:5000

Supported Stocks

Coffee & Beverage Companies: SBUX, KDP, BROS, FARM

Add new symbols to coffee_stocks list in views/dashboard.py

Usage

Running ETL

# 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

Performance Optimization

# 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.py

Deployment

Docker

docker build -t finance-integration .
docker run -p 8000:5000 --env-file .env finance-integration

Manual

export 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

Documentation

Recent Improvements

  • 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

License

This project is licensed under the MIT License - see the LICENSE file for details.


Report BugRequest FeatureDocumentationQuick Start Guide

About

Flask app for financial data analysis with intelligent ETL pipelines, multi-source fallbacks, and real-time visualizations. Tracks coffee/beverage stocks with sentiment analysis, earnings data, and interactive Plotly charts. PostgreSQL backend.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors