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):
| unique_id | ds | y | |
|---|---|---|---|
| 0 | OT | 2016-07-01 00:00:00 | 1.460552 |
| 1 | OT | 2016-07-01 01:00:00 | 1.161527 |
| 2 | OT | 2016-07-01 02:00:00 | 1.161527 |
| 3 | OT | 2016-07-01 03:00:00 | 0.862611 |
| 4 | OT | 2016-07-01 04:00:00 | 0.525227 |
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):| unique_id | TimeGPT |
|---|---|
| OT | 0.145393 |
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