https://github.com/gbourniq/portfolio-analytics-platform
Financial platform combining an interactive dashboard and REST API for investment portfolio analysis, providing real-time performance tracking across multiple stock exchanges.
https://github.com/gbourniq/portfolio-analytics-platform
dash equity fastapi fx investment pnl portfolio sp500-data-analysis yahoo-finance
Last synced: 8 months ago
JSON representation
Financial platform combining an interactive dashboard and REST API for investment portfolio analysis, providing real-time performance tracking across multiple stock exchanges.
- Host: GitHub
- URL: https://github.com/gbourniq/portfolio-analytics-platform
- Owner: gbourniq
- Created: 2024-12-17T00:43:12.000Z (10 months ago)
- Default Branch: master
- Last Pushed: 2024-12-30T04:13:10.000Z (10 months ago)
- Last Synced: 2024-12-30T13:01:58.880Z (10 months ago)
- Topics: dash, equity, fastapi, fx, investment, pnl, portfolio, sp500-data-analysis, yahoo-finance
- Language: Python
- Homepage: https://dashboard.portfolio-analytics.click
- Size: 12.5 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# Portfolio Analytics Platform
[](https://github.com/gbourniq/portfolio-analytics/actions/workflows/ci.yml)
[](https://www.python.org/downloads/)
[](https://github.com/psf/black)
[](https://github.com/gbourniq/portfolio-analytics/actions)
[](https://codecov.io/gh/gbourniq/portfolio-analytics)🌐 **Live Demo**: [dashboard.portfolio-analytics.click](https://dashboard.portfolio-analytics.click)
## Overview
A comprehensive portfolio management solution consisting of two main components:
### Interactive Dashboard

- Real-time portfolio performance visualization
- Key metrics tracking (Sharpe ratio, drawdown, PnL)
- Currency conversion support
- Customizable time period analysis### REST API

- Portfolio management operations (create, list, delete)
- Market data integration for FX and Equity
- System health monitoring
- OpenAPI 3.1 compliant### Expected input
The dashboard analyzes portfolio positions across multiple stock exchanges, accepting input data (csv, xlsx, parquet) in the following format:
| Date | AAPL | ABBV | ... | SHEL.L | DHL.DE | BNP.PA |
| ---------- | ---- | ---- | --- | ------ | ------ | ------ |
| 2018-01-01 | 52 | 79 | ... | 104 | 165 | 90 |
| 2018-01-02 | 122 | 95 | ... | 100 | 6 | 93 |
| 2018-01-03 | 86 | 199 | ... | 152 | 90 | 159 |
| ... | ... | ... | ... | ... | ... | ... |
| 2024-12-19 | 133 | 105 | ... | 39 | 187 | 78 |## Getting Started
### Quick Start with Docker
Run application locally for development/CI
```bash
docker-compose up -d --build
```Run the app in production
```bash
GIT_TAG=v0.1.28 ./run.sh
```### Local Development
1. Install dependencies:
```bash
python3.12 -m pip install poetry -U
poetry install --sync --no-interaction
```2. Start services:
```bash
python portfolio_analytics/dashboard/dashboard_main.py
python portfolio_analytics/api/api_main.py
```### CI

## Future Improvements
### Data Pipeline
- Add historical index constituents tracking via a point-in-time security master database
### API Enhancements
- Implement asynchronous pipeline execution with DynamoDB tracking
- Add paginated portfolio listing endpoints### Storage Optimization
- Migrate to S3 for blob storage
- Implement S3 pre-signed URLs for portfolio file operations### Infrastructure
- Deploy containers to ECS or Kubernetes for improved scalability
- Implement automated pipeline scheduling system (Airflow). Currently relying on triggering the APIs manually.