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>
49 lines
1.1 KiB
YAML
49 lines
1.1 KiB
YAML
# Database Configuration
|
|
# ======================
|
|
|
|
# PostgreSQL - Primary Database (trading_platform)
|
|
postgres:
|
|
host: "${DB_HOST:-localhost}"
|
|
port: "${DB_PORT:-5432}"
|
|
database: "${DB_NAME:-trading_platform}"
|
|
user: "${DB_USER:-trading}"
|
|
password: "${DB_PASSWORD:-trading_dev_2025}"
|
|
pool_size: 10
|
|
max_overflow: 20
|
|
pool_timeout: 30
|
|
pool_recycle: 3600
|
|
echo: false
|
|
|
|
# MySQL - Remote Database (Historical data - READ ONLY)
|
|
mysql:
|
|
host: "72.60.226.4"
|
|
port: 3306
|
|
user: "root"
|
|
password: "AfcItz2391,."
|
|
database: "db_trading_meta"
|
|
pool_size: 5
|
|
max_overflow: 10
|
|
pool_timeout: 30
|
|
pool_recycle: 3600
|
|
echo: false
|
|
read_only: true # Solo lectura de datos historicos
|
|
|
|
redis:
|
|
host: "localhost"
|
|
port: 6379
|
|
db: 0
|
|
password: null
|
|
decode_responses: true
|
|
max_connections: 50
|
|
|
|
# Data fetching settings
|
|
data:
|
|
default_limit: 50000
|
|
batch_size: 5000
|
|
cache_ttl: 300 # seconds
|
|
|
|
# Table names
|
|
tables:
|
|
tickers_agg_data: "tickers_agg_data"
|
|
tickers_agg_ind_data: "tickers_agg_ind_data"
|
|
tickers_agg_data_predict: "tickers_agg_data_predict" |