EUR/USD Direction Prediction Model

Binary classification model that predicts whether EUR/USD will close higher (UP) or lower (DOWN) the next trading day.

Model Details

  • Task: Binary classification (Up/Down)
  • Pair: EUR/USD
  • Horizon: Next trading day
  • Models: LightGBM + XGBoost ensemble (average probability)
  • Features: 53 technical indicators and price features
  • Training: Walk-forward expanding window (no data leakage)

Performance (Out-of-Sample, Walk-Forward)

Metric Value
Accuracy 0.6611
F1 (macro) 0.6610
F1 (binary) 0.6544
ROC AUC 0.7245
ZeroR Baseline 0.5041
Improvement +0.1570

Features

The model uses 53 features including:

  • Log returns: Multiple lookback windows (5, 10, 21, 63, 126, 252 days)
  • Momentum: Price momentum at various horizons
  • Volatility: Rolling standard deviation of returns
  • RSI: Relative Strength Index (7, 14, 21 periods)
  • MACD: Moving Average Convergence Divergence
  • Bollinger Bands: %B and bandwidth
  • ATR: Average True Range
  • Stochastic Oscillator: %K and %D
  • ADX: Average Directional Index
  • Williams %R, CCI: Additional momentum indicators
  • Channel Position: Price position within rolling high/low channels
  • Calendar: Day of week, month, quarter

Usage

import joblib, json, numpy as np
from huggingface_hub import hf_hub_download

# Download model files
lgb_model = joblib.load(hf_hub_download("lvizcaya/forex-eurusd-direction", "lgb_model.joblib"))
xgb_model = joblib.load(hf_hub_download("lvizcaya/forex-eurusd-direction", "xgb_model.joblib"))
scaler = joblib.load(hf_hub_download("lvizcaya/forex-eurusd-direction", "scaler.joblib"))
feature_cols = json.load(open(hf_hub_download("lvizcaya/forex-eurusd-direction", "feature_columns.json")))

# Prepare your features (see predict.py for full pipeline)
# X = your_features[feature_cols].values
# X_scaled = scaler.transform(X)
# prob_up = (lgb_model.predict_proba(X_scaled)[:,1] + xgb_model.predict_proba(X_scaled)[:,1]) / 2
# direction = "UP" if prob_up >= 0.5 else "DOWN"

See predict.py for a complete inference example.

Methodology

Based on published financial ML literature:

  • arxiv:2511.18578 — GBM ensemble with walk-forward validation (most robust approach)
  • arxiv:2405.08045 — Technical indicator engineering for FOREX
  • arxiv:2511.15960 — Proper baselines (ZeroR) to avoid overfitting claims

Walk-Forward Validation

  • Minimum 3 years training data
  • Retrain monthly (21 trading days)
  • Expanding window (no data discarded)
  • No random splits (prevents temporal leakage)

⚠️ Disclaimer

This model is for research and educational purposes only. It is NOT financial advice. Forex trading involves significant risk. Past performance does not guarantee future results. Realistic accuracy for daily direction prediction is 52-56% (literature consensus).

Generated by ML Intern

This model repository was generated by ML Intern, an agent for machine learning research and development on the Hugging Face Hub.

Downloads last month
247
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Spaces using lvizcaya/forex-eurusd-direction 3

Papers for lvizcaya/forex-eurusd-direction