Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
106 changes: 106 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
# Git
.git
.gitignore
.gitattributes

# Docker
Dockerfile*
docker-compose*
.dockerignore

# Python
__pycache__/
*.py[cod]
*$py.class
*.so
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# Virtual environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# IDEs
.vscode/
.idea/
*.swp
*.swo
*~

# OS
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db

# Project specific
cache/
exports/
reports_output/
logs/
*.log
htmlcov/
.coverage
coverage.xml
.pytest_cache/
.mypy_cache/
.ruff_cache/

# Temporary files
*.tmp
*.temp
temp/
tmp/

# Documentation
docs/_build/
site/

# Node.js (if any frontend)
node_modules/
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Jupyter
.ipynb_checkpoints/
*.ipynb

# Large data files
*.csv
*.json
*.pkl
*.pickle
*.h5
*.hdf5
*.parquet

# API keys and secrets
.env.local
.env.*.local
secrets/
*.key
*.pem
130 changes: 112 additions & 18 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,33 +1,127 @@
# Database Configuration
QUANTPY_DATABASE_TYPE=postgresql # or mongodb
QUANTPY_DATABASE_HOST=localhost
QUANTPY_DATABASE_PORT=5432 # 27017 for MongoDB
QUANTPY_DATABASE_NAME=quant_db
QUANTPY_DATABASE_USER=postgres
QUANTPY_DATABASE_PASSWORD=password

# API Configuration
# ===========================================
# DATA SOURCE API KEYS
# ===========================================

# Alpha Vantage - Stock/Forex/Crypto data
# Get your free API key at: https://www.alphavantage.co/support/#api-key
ALPHA_VANTAGE_API_KEY=demo

# Twelve Data - Multi-asset financial data
# Get your free API key at: https://twelvedata.com/pricing
TWELVE_DATA_API_KEY=demo

# Polygon.io - Real-time and historical market data
# Get your API key at: https://polygon.io/pricing
POLYGON_API_KEY=your_polygon_api_key_here

# Tiingo - Stock and ETF data
# Get your free API key at: https://www.tiingo.com/account/api/token
TIINGO_API_KEY=your_tiingo_api_key_here

# Finnhub - Stock market data
# Get your free API key at: https://finnhub.io/register
FINNHUB_API_KEY=your_finnhub_api_key_here

# Bybit - Crypto derivatives (optional for crypto futures)
# Get API credentials at: https://www.bybit.com/app/user/api-management
BYBIT_API_KEY=your_bybit_api_key_here
BYBIT_API_SECRET=your_bybit_api_secret_here
BYBIT_TESTNET=false

# ===========================================
# DOCKER ENVIRONMENT CONFIGURATION
# ===========================================

# Environment (development, testing, production)
ENVIRONMENT=development

# Container-specific paths (mapped to Docker volumes)
CACHE_DIR=/app/cache
LOG_LEVEL=INFO

# ===========================================
# DATABASE CONFIGURATION (Docker Services)
# ===========================================

QUANTPY_DATABASE_TYPE=postgresql
# Use Docker service name instead of localhost
QUANTPY_DATABASE_HOST=postgres
QUANTPY_DATABASE_PORT=5432
# Match docker-compose.yml database settings
QUANTPY_DATABASE_NAME=quant_system
QUANTPY_DATABASE_USER=quantuser
QUANTPY_DATABASE_PASSWORD=quantpass

# ===========================================
# REDIS CONFIGURATION (Docker Service)
# ===========================================

# Redis for caching and task queue
REDIS_URL=redis://redis:6379
REDIS_HOST=redis
REDIS_PORT=6379

# ===========================================
# API CONFIGURATION
# ===========================================

# API settings for containerized environment
QUANTPY_API_HOST=0.0.0.0
QUANTPY_API_PORT=8000
QUANTPY_API_DEBUG=true

# Data Sources
# ===========================================
# VOLUME-MAPPED PATHS
# ===========================================

# These paths are mapped to Docker volumes in docker-compose.yml
QUANTPY_CACHE_DIR=/app/cache
QUANTPY_REPORTS_OUTPUT_DIR=/app/reports_output
QUANTPY_EXPORTS_DIR=/app/exports
QUANTPY_LOGS_DIR=/app/logs
QUANTPY_CONFIG_DIR=/app/config

# ===========================================
# DATA SOURCE CONFIGURATION
# ===========================================

# Data source settings
QUANTPY_YAHOO_RETRY_COUNT=3
QUANTPY_YAHOO_TIMEOUT=30

# Backtesting Configuration
# Cache settings (use volume-mapped directory)
CACHE_ENABLED=true
CACHE_DURATION_HOURS=24
QUANTPY_CACHE_ENABLED=true
QUANTPY_CACHE_EXPIRY=86400

# Rate limiting
RATE_LIMIT_REQUESTS_PER_MINUTE=60

# ===========================================
# BACKTESTING CONFIGURATION
# ===========================================

QUANTPY_BACKTEST_INITIAL_CASH=1000
QUANTPY_BACKTEST_COMMISSION=0.002
QUANTPY_BACKTEST_DEFAULT_PERIOD=max

# Reporting
QUANTPY_REPORTS_OUTPUT_DIR=reports_output
# ===========================================
# OPTIMIZATION CONFIGURATION
# ===========================================

# Optimization
QUANTPY_OPTIMIZER_MAX_EVALS=50
QUANTPY_OPTIMIZER_RANDOM_STATE=42

# Cache Settings
QUANTPY_CACHE_ENABLED=true
QUANTPY_CACHE_DIR=.cache
QUANTPY_CACHE_EXPIRY=86400 # 24 hours in seconds
# ===========================================
# MONITORING (Optional - for prometheus profile)
# ===========================================

# Grafana admin password (if using monitoring profile)
GF_SECURITY_ADMIN_PASSWORD=admin

# ===========================================
# JUPYTER CONFIGURATION (Optional - for jupyter profile)
# ===========================================

JUPYTER_ENABLE_LAB=yes
Loading
Loading