# Stock Prediction Engine Configuration

app:
  host: "0.0.0.0"
  port: 5090

data:
  # Default tickers to track
  tickers:
    - "AAPL"
    - "MSFT"
    - "GOOGL"
    - "AMZN"
    - "TSLA"
    - "NVDA"
    - "META"
    - "BTC-USD"
    - "ETH-USD"
  
  # yfinance parameters (1d interval — 4h/1h not supported by yfinance)
  interval: "1d"
  period: "max"
  lookahead: 5

features:
  sma_periods: [10, 20, 50, 100]
  ema_periods: [12, 26, 50]
  rsi_period: 14
  macd_fast: 12
  macd_slow: 26
  macd_signal: 9
  bb_period: 20
  bb_std: 2
  volume_sma: 20
  atr_period: 14
  stoch_k: 14
  stoch_d: 3

model:
  type: "xgboost"           # xgboost | sklearn
  classification_threshold: 0.55  # Min probability to trust prediction
  train_test_split: 0.2
  n_estimators: 200
  max_depth: 6
  learning_rate: 0.1
  random_state: 42

alerts:
  enabled: true
  # Price change % that triggers alert
  price_change_pct: 5.0
  # RSI overbought/oversold thresholds
  rsi_overbought: 70
  rsi_oversold: 30
  # MACD crossover alert
  macd_crossover: true
  # Prediction confidence threshold for alert
  prediction_confidence: 0.65

scheduler:
  # Fetch and retrain every 4 hours (matching data interval)
  interval_hours: 4
  # Auto-retrain model on new data
  auto_retrain: true

storage:
  data_dir: "data/cache"
  model_dir: "models/saved"