A full-stack financial analytics dashboard featuring real-time stock market data analysis, ARIMA forecasting models, and interactive visualizationsβcontainerized with Docker and deployable to AWS EC2 with custom domain support.
This platform provides comprehensive time series analysis and forecasting for financial markets. It combines statistical modeling (ARIMA), interactive visualizations, and a modern web interface into a containerized application ready for cloud deployment.
Key Achievement: Solved complex Docker volume mounting and composition challenges for seamless data persistence across environmentsβfrom development to production on AWS EC2.
- Real-time Stock Data: Live market data fetching via Yahoo Finance API
- ARIMA Forecasting: Time series prediction with configurable parameters (p, d, q)
- Statistical Analysis:
- Moving averages and volatility metrics
- Returns analysis and distribution modeling
- Autocorrelation and partial autocorrelation functions
- Seasonal decomposition (trend, seasonal, residual)
- Normality Testing: Shapiro-Wilk and visual Q-Q plots
- Multi-panel Dashboard: Candlestick charts, volume analysis, price movements
- Technical Indicators: Rolling means, Bollinger bands, volatility measures
- Forecast Visualization: Model predictions with confidence intervals
- Diagnostic Plots: Residual analysis, ACF/PACF plots, decomposition charts
- Modern Streamlit Dashboard: Responsive layout with intuitive controls
- Ticker Selection: Quick-select popular stocks or enter custom symbols
- Date Range Filtering: Analyze specific time periods
- Customizable Visualizations: Adjustable parameters and color schemes
- Real-time Updates: Dynamic data refresh on selection changes
- Dockerized Application: Containerized setup for easy deployment
- AWS EC2 Deployment: Production-ready cloud infrastructure
- Custom Domain: Cloudflare DNS integration for professional access
- Data Persistence: Volume mounting for environment consistency
- CI/CD Ready: Makefile automation for builds and deployments
# System Requirements
- Python 3.8+
- Docker & Docker Compose
- Git- Clone the repository
git clone https://github.com/yourusername/architecture-fullstack.git
cd architecture-fullstack- Set up Python environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txt- Run the dashboard locally
streamlit run main.pyThe dashboard will open at http://localhost:8501
- Build and run with Docker Compose
docker-compose up --build- Access the application
- Dashboard:
http://localhost:8501
# Build new image
make build_new
# Build and publish to Docker Hub
make drhub
# Build and publish to GitHub Container Registry
make gitarchitecture-fullstack/
βββ main.py # Main Streamlit application
βββ datamover.py # Data fetching and preprocessing utilities
βββ requirements.txt # Python dependencies
βββ Dockerfile # Container image definition
βββ docker-compose.yaml # Container orchestration
βββ Makefile # Build and deployment automation
βββ dev_folder/ # Development notebooks and data
β βββ dev_notebook.ipynb
β βββ timeseries_analysis.ipynb
βββ .streamlit/ # Streamlit configuration
βββ config.toml
- Python 3.8+: Primary programming language
- Streamlit: Interactive web application framework
- Pandas & NumPy: Data manipulation and numerical computing
- yfinance: Yahoo Finance API wrapper for real-time market data
- statsmodels: ARIMA time series forecasting
- SciPy: Statistical analysis and testing
- scikit-learn: Additional ML utilities
- Plotly: Interactive charts and graphs
- Matplotlib & Seaborn: Statistical visualizations
- mplfinance: Financial-specific chart types (candlesticks, volume)
- Docker: Containerization platform
- Docker Compose: Container orchestration
- AWS EC2: Cloud compute instance
- Cloudflare: DNS and CDN services
- Select a ticker from the sidebar (AAPL, GOOG, MSFT, TSLA) or enter a custom symbol
- Choose your date range using the date pickers
- Explore the visualizations:
- Historical price data and volume
- Statistical metrics and distributions
- ARIMA forecast predictions
- Decomposition analysis
The dashboard allows you to adjust ARIMA parameters:
- p (AR order): Number of lag observations
- d (Differencing): Degree of differencing
- q (MA order): Size of moving average window
Set the number of days to forecast into the future (1-90 days).
βββββββββββββββββββ
β User Browser β
ββββββββββ¬βββββββββ
β
ββββββΌβββββββββ
β Streamlit β (Port 8501)
β Dashboard β
ββββββ¬βββββββββ
β
ββββββΌβββββββββ
β yfinance β
β API β
βββββββββββββββ
- Data Ingestion: Real-time stock data fetched via Yahoo Finance API
- Processing: Data cleaning, transformation, and feature engineering
- Analysis: Statistical analysis and ARIMA model training
- Visualization: Interactive charts rendered in Streamlit
- Deployment: Containerized application ready for cloud deployment
-
Launch EC2 Instance
- AMI: Ubuntu 20.04 LTS
- Instance Type: t2.micro or larger
- Security Group: Open port 8501
-
Install Docker
sudo apt-get update
sudo apt-get install docker.io docker-compose
sudo usermod -aG docker ubuntu- Deploy Application
git clone <your-repo>
cd architecture-fullstack
docker-compose up -d- Configure Domain (Optional)
- Point your domain to the EC2 instance IP in Cloudflare DNS
The dev_folder/ contains Jupyter notebooks for experimentation:
cd dev_folder
jupyter notebook- Create a new branch
- Implement your feature in
main.pyor create new modules - Test locally with
streamlit run main.py - Update tests and documentation
- Submit a pull request
Port already in use
# Kill process on port 8501
lsof -ti:8501 | xargs kill -9Docker volume issues
# Remove all containers and volumes
docker-compose down -v
docker system prune -ayfinance data not loading
- Check your internet connection
- Verify ticker symbol is valid
- Yahoo Finance may temporarily rate-limit requests
Edit .streamlit/config.toml to customize:
- Theme colors
- Server settings
- Browser behavior
Modify docker-compose.yaml to adjust:
- Port mappings
- Volume mounts
- Resource limits
Contributions are welcome! Please feel free to submit a Pull Request. For major changes:
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Yahoo Finance for providing free financial data API
- Streamlit for the amazing web framework
- statsmodels for time series analysis tools
Dominik Huffield
Twitter - @cogentdom
My Work - portfolio
Business - ohmic data
Project Link: architecture-fullstack
β If you found this project helpful, please consider giving it a star!
