| .streamlit/.streamlit | ||
| config | ||
| ETF_Portal | ||
| pages | ||
| portfolios | ||
| scripts | ||
| tests | ||
| .env.template | ||
| .gitignore | ||
| Caddyfile | ||
| cli_manager.py | ||
| docker-compose.yml | ||
| Dockerfile | ||
| etf_suite_cli.py | ||
| ETF_Suite_Launcher.py | ||
| README.md | ||
| requirements.txt | ||
| setup.py | ||
ETF Portal
A comprehensive tool for ETF portfolio management and analysis.
Installation
- Clone the repository:
git clone <repository-url>
cd ETF_Portal
- Create and activate a virtual environment:
python3 -m venv venv
source venv/bin/activate # On Linux/Mac
# or
.\venv\Scripts\activate # On Windows
- Install the package in development mode:
pip install -e .
Environment Setup
-
Copy the environment template:
cp .env.template .env -
Edit the
.envfile and add your API keys:FMP_API_KEY=your_api_key_here CACHE_DURATION_HOURS=24 -
Never commit the
.envfile to version control.
Usage
The ETF Portal provides a command-line interface for managing the application:
# Start the launcher
etf-portal start
# Start a specific component
etf-portal start --component portfolio_builder
# Start in background mode
etf-portal start --component launcher --background
# Stop all components
etf-portal stop
# Stop a specific component
etf-portal stop --component analyzer
# Check status
etf-portal status
# Restart components
etf-portal restart
# View logs
etf-portal logs
# Update configuration
etf-portal config --key ports.launcher --value 8500
Components
- Launcher: The main entry point for the ETF Portal (port 8500)
- Portfolio Builder: Tool for building and managing ETF portfolios (port 8501)
- Analyzer: Tool for analyzing ETF portfolios (port 8502)
Configuration
The configuration file is located at config/etf_suite_config.json. You can modify it directly or use the config command:
etf-portal config --key ports.launcher --value 8500
Logs
Logs are stored in the logs directory. You can view recent logs using:
etf-portal logs
Features
- ETF Discovery & Filtering: Find ETFs based on yield, category, AUM, and other criteria
- Portfolio Builder: Create balanced portfolios with custom allocations
- DRIP Calculator: Project growth with dividend reinvestment
- Economic Comparison: Compare DRIP vs. No-DRIP strategies with accurate capital recovery calculation
- Risk Assessment: AI-powered analysis of NAV and yield erosion risks
- PDF Reports: Generate downloadable PDF reports of your portfolio analysis
- ETF Analyzer: Detailed analysis of individual ETFs including holdings, sectors, and dividend history
- CLI Tool: Command-line interface for managing the ETF Suite applications
Requirements
- Python 3.8+
- Streamlit
- Financial Modeling Prep API key (paid subscription)
- Pandas, Numpy, Plotly, and other dependencies
Setup
- Clone the repository
- Install dependencies:
pip install -r requirements.txt - Get an API key from Financial Modeling Prep
- Create a
.streamlit/secrets.tomlfile with your API key:fmp_api_key = "YOUR_API_KEY_HERE" - Install the ETF Suite CLI:
pip install -e . - Run the application using the CLI:
etf-suite start --component all
ETF Suite CLI
The ETF Suite CLI provides a convenient way to manage the different components of the ETF Suite from the command line.
Installation
# Install the package
pip install -e .
# Create required directories
sudo mkdir -p /var/run/etf-portal
sudo mkdir -p /var/log/etf-portal
sudo chown -R $USER:$USER /var/run/etf-portal
sudo chown -R $USER:$USER /var/log/etf-portal
Usage
# Start the ETF Portal application
etf-portal start
# Stop the ETF Portal application
etf-portal stop
# Restart the ETF Portal application
etf-portal restart
# Check the status of the ETF Portal application
etf-portal status
Logs
Logs are stored in /var/log/etf-portal/cli_manager.log
PID File
The PID file is stored in /var/run/etf-portal/etf_portal.pid
Usage
- Set your initial capital amount
- Use the filters to discover ETFs based on your criteria
- Add ETFs to your portfolio and adjust allocations
- Run the analysis to see projections and comparisons
- Generate a PDF report for your records
Data Source
This application uses the Financial Modeling Prep (FMP) API for real-time ETF data, including:
- ETF listings and details
- Price and dividend history
- Fundamental data
License
MIT License
Author
Pascal