Views
No views yet
| Property | Value |
|---|---|
| Model Type | XGBoost Classifier |
| Task | Binary Classification (Up vs Down) |
| Prediction Horizon | 3 trading days |
| Lookback Window | 20 days |
| Data Period | 10 years (2016-2026) |
| Move Threshold | 0.3% minimum move |
| Confidence Threshold | 58% |
| Metric | Value |
|---|---|
| Test Accuracy | 53.25% |
| Test AUC | 55.77% |
| Down Recall | 47% |
| Up Recall | 57% |
| Threshold | Trades | Win Rate | Total Return | Sharpe |
|---|---|---|---|---|
| 55% | High | Variable | Variable | Variable |
| 58% | Balanced | Best risk/reward | Optimized | Optimized |
| 60%+ | Low | High precision | Conservative | Conservative |
pip install yfinance xgboost pandas numpy scikit-learn1from xauusd_inference import main
2
3result = main()
4# Returns: {'signal': '🟢 LONG (Buy)', 'prob_up': 0.62, ...}python xauusd_inference.py| Signal | Probability Range | Action |
|---|---|---|
| 🟢 LONG | Prob Up > 58% | Consider buying XAUUSD |
| 🔴 SHORT | Prob Up < 42% | Consider selling XAUUSD |
| 🟡 NEUTRAL | 42% ≤ Prob Up ≤ 58% | Wait for clearer signal |
GC=F - Gold Futures (XAUUSD proxy)DX-Y.NYB - US Dollar IndexSI=F - Silver FuturesSPY - S&P 500 ETF| File | Description |
|---|---|
xauusd_trading_model.json | Trained XGBoost model |
xauusd_scaler.pkl | Feature scaler (StandardScaler) |
xauusd_feature_names.json | Feature name mapping |
xauusd_model_config.json | Model configuration |
xauusd_inference.py | Real-time inference pipeline |
xauusd_final_model.py | Training script |