What is Long-Horizon Forecasting?
Long-horizon forecasting refers to predictions far into the future, typically exceeding two seasonal periods. For example, forecasting electricity demand 3 months ahead for hourly data, or predicting sales 2 years ahead for monthly data. The exact threshold depends on data frequency. The further you forecast, the more uncertainty you face. The key challenge with long-horizon forecasting is that these predictions extend so far into the future that they may be influenced by unforeseen factors not present in the initial dataset. This means long-horizon forecasts generally involve greater risk and uncertainty compared to short-term predictions. To address these unique challenges, Nixtla provides the specializedtimegpt-1-long-horizon model in TimeGPT. You can access this model by simply specifying model="timegpt-1-long-horizon" when calling nixtla_client.forecast.
When to Use Long-Horizon Forecasting
Long-horizon forecasting is ideal for:- Supply chain planning: Predict inventory needs 3-6 months ahead
- Financial forecasting: Model quarterly or annual revenue projections
- Energy demand: Forecast power consumption weeks or months in advance
- Climate modeling: Predict seasonal weather patterns
timegpt-1-long-horizon model when your forecast horizon exceeds two complete seasonal cycles in your data.
How to Use the Long-Horizon Model
Step 1: Import Packages
Start by installing and importing the required packages, then initialize the Nixtla client:Step 2: Load the Data
We’ll demonstrate long-horizon forecasting using the ETTh1 dataset, which measures oil temperatures and load variations on an electricity transformer in China. Here, we only forecast oil temperatures (y):
We’ll set our horizon to 96 timestamps (4 days) for testing and use the previous 42 days as input to the model:
Step 3: Forecasting with the Long-Horizon Model
TimeGPT’stimegpt-1-long-horizon model is optimized for predictions far into the future. Specify it like so:

TimeGPT Long-Horizon Forecast with 90% Confidence Intervals
Step 4: Evaluation
Finally, assess forecast performance using Mean Absolute Error (MAE):
The model achieves a MAE of approximately 0.146, indicating strong performance for these longer-range forecasts.
Frequently Asked Questions
Q: What’s the difference between timegpt-1 and timegpt-1-long-horizon? Thetimegpt-1-long-horizon model is specifically trained for extended forecast horizons (2+ seasonal periods), providing better accuracy for long-range predictions.
Q: How far ahead can I forecast with the long-horizon model?
The optimal horizon depends on your data frequency and patterns. Generally, the model performs well up to 4-6 seasonal cycles ahead.
Q: Can I use exogenous variables with long-horizon forecasting?
Yes, TimeGPT supports exogenous variables for improved long-horizon accuracy. See our exogenous variables guide for details.
Related Resources
Learn more about TimeGPT capabilities:- Fine-tuning TimeGPT - Improve accuracy for your specific dataset
- Prediction Intervals - Quantify forecast uncertainty
- Cross-Validation - Validate model performance
- Anomaly Detection - Identify unusual patterns in time series