Initial commit: Vault Dashboard for options hedging
- FastAPI + NiceGUI web application - QuantLib-based Black-Scholes pricing with Greeks - Protective put, laddered, and LEAPS strategies - Real-time WebSocket updates - TradingView-style charts via Lightweight-Charts - Docker containerization - GitLab CI/CD pipeline for VPS deployment - VPN-only access configuration
This commit is contained in:
94
README.md
Normal file
94
README.md
Normal file
@@ -0,0 +1,94 @@
|
||||
# Vault Dashboard
|
||||
|
||||
A real-time options hedging dashboard for Lombard loan protection strategies.
|
||||
|
||||
## Features
|
||||
|
||||
- **Live Options Data**: Integration with Interactive Brokers and free data sources
|
||||
- **Hedge Calculations**: Black-Scholes pricing, Greeks, strategy comparisons
|
||||
- **Interactive Charts**: TradingView-quality visualizations with Lightweight Charts
|
||||
- **Strategy Analysis**: Protective puts, collars, laddered positions
|
||||
- **Real-time Updates**: WebSocket-based live data streaming
|
||||
|
||||
## Quick Start
|
||||
|
||||
### Local Development
|
||||
|
||||
```bash
|
||||
# Create virtual environment
|
||||
python3 -m venv .venv
|
||||
source .venv/bin/activate
|
||||
|
||||
# Install dependencies
|
||||
pip install -r requirements.txt
|
||||
|
||||
# Run development server
|
||||
python -m uvicorn app.main:app --reload --host 0.0.0.0 --port 8000
|
||||
```
|
||||
|
||||
### Docker
|
||||
|
||||
```bash
|
||||
# Build
|
||||
docker build -t vault-dash .
|
||||
|
||||
# Run
|
||||
docker run -p 8000:8000 vault-dash
|
||||
```
|
||||
|
||||
### Docker Compose
|
||||
|
||||
```bash
|
||||
docker-compose up -d
|
||||
```
|
||||
|
||||
## Architecture
|
||||
|
||||
```
|
||||
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
|
||||
│ IBKR │────▶│ FastAPI │────▶│ Redis │
|
||||
│ Gateway │ │ Backend │ │ (cache) │
|
||||
└─────────────┘ └─────────────┘ └─────────────┘
|
||||
│
|
||||
▼
|
||||
┌─────────────────────────────┐
|
||||
│ NiceGUI Dashboard │
|
||||
│ (WebSocket client) │
|
||||
└─────────────────────────────┘
|
||||
```
|
||||
|
||||
## Configuration
|
||||
|
||||
Copy `config/settings.example.yaml` to `config/settings.yaml` and configure:
|
||||
|
||||
```yaml
|
||||
# Broker settings
|
||||
broker:
|
||||
type: ibkr # or alpaca, yfinance
|
||||
|
||||
# IBKR settings
|
||||
ibkr:
|
||||
host: 127.0.0.1
|
||||
port: 7497 # TWS: 7497, Gateway: 4001
|
||||
client_id: 1
|
||||
|
||||
# Portfolio defaults
|
||||
portfolio:
|
||||
gold_value: 1000000
|
||||
loan_amount: 600000
|
||||
ltv_ratio: 0.60
|
||||
margin_call_threshold: 0.75
|
||||
|
||||
# Data sources
|
||||
data:
|
||||
primary: yfinance # or ibkr, alpaca
|
||||
cache_ttl: 300
|
||||
```
|
||||
|
||||
## Deployment
|
||||
|
||||
See [DEPLOYMENT.md](DEPLOYMENT.md) for GitLab CI/CD and VPS deployment instructions.
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
||||
Reference in New Issue
Block a user