Quick Comparison
XGBoost
Best for: 1-72 hours
Strength: High short-term accuracy
Speed: Fast training, slow prediction
Strength: High short-term accuracy
Speed: Fast training, slow prediction
Prophet
Best for: 1 week - 1 month
Strength: Trend & seasonality
Speed: Slow training, fast prediction
Strength: Trend & seasonality
Speed: Slow training, fast prediction
Hybrid
Best for: All horizons
Strength: Automatic selection
Speed: Slow training, fast prediction
Strength: Automatic selection
Speed: Slow training, fast prediction
Detailed Comparison Table
Performance Characteristics
| Feature | XGBoost | Prophet | Hybrid |
|---|---|---|---|
| Optimal Horizon | 1-72 hours | 1 week - 1 month | All (1h - 1 month) |
| Short-term Accuracy (1-24h) | ⭐⭐⭐⭐⭐ (Best) | ⭐⭐ (Poor) | ⭐⭐⭐⭐⭐ (Best) |
| Medium-term Accuracy (1-3d) | ⭐⭐⭐⭐ (Good) | ⭐⭐⭐ (Fair) | ⭐⭐⭐⭐⭐ (Best) |
| Long-term Accuracy (1w+) | ⭐⭐ (Poor) | ⭐⭐⭐⭐⭐ (Best) | ⭐⭐⭐⭐⭐ (Best) |
| Typical MAPE (24h) | 2-4% | 6-10% | 2-4% |
| Typical MAPE (7d) | 8-15% | 8-12% | 8-12% |
| Direction Accuracy | 60-70% (short) | 50-58% (long) | Varies by horizon |
Technical Specifications
| Aspect | XGBoost | Prophet | Hybrid |
|---|---|---|---|
| Algorithm | Gradient Boosting | Additive Decomposition | Ensemble |
| Training Time | 5-15 sec | 10-30 sec | 15-45 sec |
| Prediction Time (24h) | 200-500ms | 50-100ms | 50-100ms |
| Prediction Time (168h) | 1-3 sec | 50-100ms | 50-100ms |
| Memory Usage | Medium | Low | High |
| Model Size | ~5-20 MB | ~1-5 MB | ~10-25 MB |
| Min Data Points | 100 | 100 | 100 |
| Recommended Data | 1000+ | 1000+ | 1000+ |
Feature Capabilities
| Feature | XGBoost | Prophet | Hybrid |
|---|---|---|---|
| Feature Engineering | 60+ auto features | None (just ds/y) | 60+ (XGBoost) |
| Technical Indicators | ✅ RSI, MACD, BB | ❌ Not supported | ✅ Via XGBoost |
| Trend Detection | ❌ Implicit only | ✅ Explicit component | ✅ Via Prophet |
| Seasonality | ❌ Via lag features | ✅ Daily/weekly | ✅ Via Prophet |
| Confidence Intervals | ⚠️ Estimated | ✅ Native | ✅ Both |
| Missing Data | ❌ Must drop | ✅ Handles gaps | ⚠️ Mixed |
| Interpretability | ⭐⭐ Feature importance | ⭐⭐⭐⭐⭐ Clear components | ⭐⭐⭐ Medium |
Model Parameters
XGBoost Configuration
n_estimators: More trees = better fit, slower training (100-500)learning_rate: Lower = more conservative, needs more trees (0.01-0.3)max_depth: Deeper = more complex patterns, risk overfitting (3-10)
Prophet Configuration
changepoint_prior_scale: Higher = more flexible trend (0.001-0.5)seasonality_prior_scale: Higher = stronger seasonality (1-20)interval_width: Confidence level for bounds (0.8-0.99)
Hybrid Configuration
- ≤24h: XGBoost only (100% weight)
- 24-72h: Weighted ensemble (gradient from XGBoost → Prophet)
-
72h: Prophet dominant (or 100% Prophet at 168h)
Prediction Comparison
Typical Accuracy by Horizon
- 1-24 Hours
- 1-3 Days
- 1 Week
- 1 Month
| Model | MAPE | Direction Acc | Best Use |
|---|---|---|---|
| XGBoost | 2-4% | 60-70% | ✅ Recommended |
| Prophet | 6-10% | 52-58% | ❌ Too inaccurate |
| Hybrid | 2-4% | 60-70% | ✅ Recommended |
Training Comparison
Training Process
Training Speed Benchmark
Test: 1000 hourly data points, Bitcoin| Model | Training Time | Prediction Time (24h) | Prediction Time (168h) |
|---|---|---|---|
| XGBoost | ~8 seconds | ~300ms (iterative) | ~2 seconds |
| Prophet | ~18 seconds | ~60ms (direct) | ~80ms |
| Hybrid | ~26 seconds | ~60ms | ~80ms |
Prophet is slower to train but much faster for multi-step predictions because it predicts all periods directly (no iteration).
Prediction Speed Comparison
Why XGBoost is Slower for Multi-step
Prediction Time Chart
| Periods | XGBoost | Prophet | Hybrid |
|---|---|---|---|
| 1 | ~10ms | ~50ms | ~50ms |
| 12 | ~100ms | ~55ms | ~55ms |
| 24 | ~200ms | ~60ms | ~60ms |
| 72 | ~600ms | ~70ms | ~70ms |
| 168 | ~1.5s | ~80ms | ~80ms |
| 720 | ~6s | ~120ms | ~120ms |
Feature Engineering
XGBoost Features (60+)
Returns (4 features)
Returns (4 features)
- 1-hour return:
df['close'].pct_change(1) - 4-hour return:
df['close'].pct_change(4) - 24-hour return:
df['close'].pct_change(24) - 7-day return:
df['close'].pct_change(168)
Moving Averages (12 features)
Moving Averages (12 features)
- MA periods: 7, 14, 30, 50
- EMA periods: 12, 26, 50
- Price-to-MA ratios for each MA
Volatility (3 features)
Volatility (3 features)
- Rolling std: 7, 14, 30 periods
- Based on 1-hour returns
Bollinger Bands (4 features)
Bollinger Bands (4 features)
- Middle band (20-period MA)
- Upper band (middle + 2*std)
- Lower band (middle - 2*std)
- Band position (normalized)
Technical Indicators (6+ features)
Technical Indicators (6+ features)
- RSI normalized, overbought/oversold
- MACD difference and signal
- High/low ratio
- Close/open ratio
Volume (3 features)
Volume (3 features)
- Volume MA (7 periods)
- Volume ratio
- Volume change
Temporal (4 features)
Temporal (4 features)
- Hour of day (0-23)
- Day of week (0-6)
- Day of month (1-31)
- Month (1-12)
Lag Features (5 features)
Lag Features (5 features)
- Close lag: 1, 2, 3, 7, 14 periods
Prophet Features (2)
ds: Timestamp (automatically extracts seasonality)y: Close price
- Trend component
- Daily seasonality (24-hour patterns)
- Weekly seasonality (7-day patterns)
Use Case Recommendations
Choose XGBoost When:
✅ Prediction horizon is 1-72 hours✅ You have technical indicators (RSI, MACD, etc.)
✅ Need highest short-term accuracy
✅ Intraday trading strategies
✅ Rich OHLCV historical data available
✅ Care about direction accuracy >60%
Choose Prophet When:
✅ Prediction horizon is >1 week✅ Need trend decomposition
✅ Want native confidence intervals
✅ Weekly/monthly planning
✅ Seasonality analysis is important
✅ Have missing data gaps
✅ Need fast multi-step predictions
Choose Hybrid When:
✅ Prediction horizon varies (1h to 1 month)✅ Want automatic model selection
✅ Building a general-purpose forecasting system
✅ Need best-of-both-worlds approach
✅ Production deployment
✅ Don’t want to manually choose models
✅ Value smooth transitions between models
Code Examples
Quick Start Comparison
Backtesting Comparison
Decision Flowchart
Summary Table
| Criteria | XGBoost | Prophet | Hybrid |
|---|---|---|---|
| Best Horizon | 1-72h | 1w-1m | All |
| Accuracy (Short) | ⭐⭐⭐⭐⭐ | ⭐⭐ | ⭐⭐⭐⭐⭐ |
| Accuracy (Long) | ⭐⭐ | ⭐⭐⭐⭐⭐ | ⭐⭐⭐⭐⭐ |
| Training Speed | ⭐⭐⭐⭐ | ⭐⭐⭐ | ⭐⭐ |
| Prediction Speed | ⭐⭐ | ⭐⭐⭐⭐⭐ | ⭐⭐⭐⭐⭐ |
| Interpretability | ⭐⭐ | ⭐⭐⭐⭐⭐ | ⭐⭐⭐ |
| Ease of Use | ⭐⭐⭐ | ⭐⭐⭐⭐ | ⭐⭐⭐⭐⭐ |
| Memory Usage | ⭐⭐⭐ | ⭐⭐⭐⭐⭐ | ⭐⭐ |
| Confidence Intervals | ⭐⭐⭐ | ⭐⭐⭐⭐⭐ | ⭐⭐⭐⭐⭐ |
| Feature Engineering | Auto (60+) | None needed | Auto (60+) |
| Data Requirements | 1000+ | 1000+ | 1000+ |
| Production Ready | ✅ | ✅ | ✅ |
Final Recommendations
For Most Users
Use the Hybrid model - it automatically selects the best approach for your horizon and provides optimal predictions across all timeframes.
For High-Frequency Traders
Use XGBoost - maximum short-term accuracy for intraday strategies.
For Strategic Planning
Use Prophet - clear trend analysis and seasonality for long-term decisions.
Next Steps
XGBoost Details
Deep dive into XGBoost model
Prophet Details
Deep dive into Prophet model
Hybrid Details
Deep dive into Hybrid model