ETF_Suite_Portal/README.md
Pascal 1ff511ebe1 chore: Update project configuration and add setup scripts
- Update Docker and Caddy configuration

- Add VPS setup and secrets management scripts

- Add test suite

- Update documentation

- Clean up cache files
2025-05-27 14:41:58 +02:00

197 lines
4.3 KiB
Markdown

# ETF Portal
A comprehensive tool for ETF portfolio management and analysis.
## Installation
1. Clone the repository:
```bash
git clone <repository-url>
cd ETF_Portal
```
2. Create and activate a virtual environment:
```bash
python3 -m venv venv
source venv/bin/activate # On Linux/Mac
# or
.\venv\Scripts\activate # On Windows
```
3. Install the package in development mode:
```bash
pip install -e .
```
## Environment Setup
1. Copy the environment template:
```bash
cp .env.template .env
```
2. Edit the `.env` file and add your API keys:
```
FMP_API_KEY=your_api_key_here
CACHE_DURATION_HOURS=24
```
3. Never commit the `.env` file to version control.
## Usage
The ETF Portal provides a command-line interface for managing the application:
```bash
# 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:
```bash
etf-portal config --key ports.launcher --value 8500
```
## Logs
Logs are stored in the `logs` directory. You can view recent logs using:
```bash
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
1. Clone the repository
2. Install dependencies:
```
pip install -r requirements.txt
```
3. Get an API key from [Financial Modeling Prep](https://financialmodelingprep.com/developer/docs/)
4. Create a `.streamlit/secrets.toml` file with your API key:
```
fmp_api_key = "YOUR_API_KEY_HERE"
```
5. Install the ETF Suite CLI:
```
pip install -e .
```
6. 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
```bash
# 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
```bash
# 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
1. Set your initial capital amount
2. Use the filters to discover ETFs based on your criteria
3. Add ETFs to your portfolio and adjust allocations
4. Run the analysis to see projections and comparisons
5. 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