Finance Index Dashboard: A Python-Based Financial Tool

github repo

Finance Index Dashboard is a Python-based application designed to provide dynamic financial indices and live performance tracking. It integrates data ingestion, signal computation, and index rebalancing with a modern web frontend for visualization.


Features

  • ETL pipeline for fetching and processing financial data from multiple sources
  • Computation of financial signals including momentum scores and technical indicators
  • Dynamic index definitions and automated rebalancing
  • REST API built with FastAPI exposing indices and ticker data
  • React/Next.js frontend for interactive visualization of indices and holdings
  • Dockerized setup for easy deployment and development
  • Database schema migrations managed with Alembic
  • Audit and auto-fix tools for database health and consistency

Tech Stack

  • Backend: Python, FastAPI, SQLAlchemy, Alembic
  • Database: PostgreSQL
  • Data Sources: yfinance, Wikipedia scraping for tickers
  • Frontend: React, Next.js, Recharts
  • Containerization: Docker, Docker Compose

Getting Started

Prerequisites

  • Docker and Docker Compose installed
  • Optional: Set environment variable FINNHUB_API_KEY for ETL data enrichment

Setup and Run

# Clone the repo
git clone https://github.com/justin-napolitano/finance-index-dashboard.git
cd finance-index-dashboard

# Start the full stack (DB, backend, ETL job)
docker compose up -d

# To stop the stack
docker compose down

# Run ETL job manually
make tickers-refresh

# Run backend API locally (hot reload)
make bash-backend
# inside container: uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload

# Access frontend
cd frontend
npm install
npm run dev
# Open http://localhost:3000

Project Structure

finance-index-dashboard/
β”œβ”€β”€ backend/               # Python backend source code
β”‚   β”œβ”€β”€ app/               # FastAPI app, ETL modules, DB models
β”‚   β”œβ”€β”€ ops/               # DB audit and fix utilities
β”‚   β”œβ”€β”€ migrations/        # Alembic migration scripts
β”‚   β”œβ”€β”€ docker-compose.yml # Docker compose for backend and DB
β”‚   └── makefile           # Common commands for dev and maintenance
β”œβ”€β”€ db/                    # Database persistent data volume
β”œβ”€β”€ frontend/              # React/Next.js frontend
β”‚   β”œβ”€β”€ pages/             # React pages for indices and tickers
β”‚   β”œβ”€β”€ package.json       # Frontend dependencies and scripts
β”‚   └── next.config.js     # Next.js configuration
β”œβ”€β”€ context.txt            # Assorted notes (assumed)
β”œβ”€β”€ roadmap.txt            # Project roadmap and future tasks
└── docker-compose.yml     # Root compose file (if present)

Future Work / Roadmap

  • Expand index definitions beyond default "momentum-10" strategy
  • Add more comprehensive signal computations and technical indicators
  • Improve frontend UI/UX with richer charts and filtering
  • Integrate authentication and user-specific portfolio tracking
  • Enhance ETL robustness and add alternative data sources
  • Add automated testing and CI/CD pipelines
  • Optimize database queries and indexing strategies

Note: Some assumptions were made regarding missing documentation based on code and file structure.

hjkl / arrows Β· / search Β· :family Β· :tag Β· :datefrom Β· :dateto Β· ~/entries/slug Β· Ctrl+N/Ctrl+P for suggestions Β· Ctrl+C/Ctrl+G to cancel
entries 201/201 Β· entry -/-
:readyentries 201/201 Β· entry -/-