Hierarchical ML Pipeline for trading predictions:
- Level 0: Attention Models (volatility/flow classification)
- Level 1: Base Models (XGBoost per symbol/timeframe)
- Level 2: Metamodels (XGBoost Stacking + Neural Gating)
Key components:
- src/pipelines/hierarchical_pipeline.py - Main prediction pipeline
- src/models/ - All ML model classes
- src/training/ - Training utilities
- src/api/ - FastAPI endpoints
- scripts/ - Training and evaluation scripts
- config/ - YAML configurations
Note: Trained models (*.joblib, *.pt) are gitignored.
Regenerate with training scripts.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
56 lines
1.2 KiB
Plaintext
56 lines
1.2 KiB
Plaintext
# Trading Platform IA - ML Engine Configuration
|
|
# ======================================
|
|
|
|
# Server Configuration
|
|
HOST=0.0.0.0
|
|
PORT=3083
|
|
DEBUG=false
|
|
LOG_LEVEL=INFO
|
|
|
|
# CORS Configuration
|
|
CORS_ORIGINS=http://localhost:3000,http://localhost:5173,http://localhost:8000
|
|
|
|
# Data Service Integration (Massive.com/Polygon data)
|
|
DATA_SERVICE_URL=http://localhost:3084
|
|
|
|
# Database Configuration (PostgreSQL)
|
|
DATABASE_URL=postgresql://trading_user:trading_user_dev_2025@localhost:5432/trading_platform
|
|
DB_HOST=localhost
|
|
DB_PORT=5432
|
|
DB_NAME=trading_platform
|
|
DB_USER=trading_user
|
|
DB_PASSWORD=trading_user_dev_2025
|
|
|
|
# Model Configuration
|
|
MODELS_DIR=models
|
|
MODEL_CACHE_TTL=3600
|
|
|
|
# Supported Symbols
|
|
SUPPORTED_SYMBOLS=XAUUSD,EURUSD,GBPUSD,USDJPY,BTCUSD,ETHUSD
|
|
|
|
# Prediction Configuration
|
|
DEFAULT_TIMEFRAME=15m
|
|
DEFAULT_RR_CONFIG=rr_2_1
|
|
LOOKBACK_PERIODS=500
|
|
|
|
# GPU Configuration (for PyTorch/XGBoost)
|
|
# CUDA_VISIBLE_DEVICES=0
|
|
# USE_GPU=true
|
|
|
|
# Feature Engineering
|
|
FEATURE_CACHE_TTL=60
|
|
MAX_FEATURE_AGE_SECONDS=300
|
|
|
|
# Signal Generation
|
|
SIGNAL_VALIDITY_MINUTES=15
|
|
MIN_CONFIDENCE_THRESHOLD=0.55
|
|
|
|
# Backtesting
|
|
BACKTEST_DEFAULT_CAPITAL=10000
|
|
BACKTEST_DEFAULT_RISK=0.02
|
|
|
|
# Logging
|
|
LOG_FILE=logs/ml-engine.log
|
|
LOG_ROTATION=10 MB
|
|
LOG_RETENTION=7 days
|