Unit 4 / 11

Time Series Analysis and Forecast Support

Gains:

  • Understanding time series concepts such as trend, seasonality, cycle and stationarity with the support of artificial intelligence and being able to parse a series correctly
  • Ability to install ARIMA, ETS and simple benchmark models into artificial intelligence as code, produce predictions and evaluate them with backtesting
  • Being able to understand the fragility of the forecast in the face of uncertainty range, model limit and structural break, and to maintain that the responsibility for the forecast remains with the economist.

The language of economics is time. Inflation, growth, unemployment, exchange rates — they are all series that flow over time, and one of the things the economist is most often asked is "so what happens next?" is the question. In this unit, we will use artificial intelligence to understand time series concepts, build model code, and produce forecasts. But let's clarify the framework from the very beginning: A forecast is not a prophecy, but a conditional prediction under uncertainty, and the responsibility lies with the economist. AI can write you ARIMA code in minutes; But it is the human being who decides whether that prediction is reasonable or not and whether it will collapse in the face of a structural break.

Components of a time series

It helps to think of any economic series by breaking it down into four parts:

  • Trend (tendency). Long term direction; such as the growth path of the economy.
  • Seasonality. Pattern that repeats regularly throughout the year; Tourism increases in summer, retail increases in December.
  • Cycle (conjuncture). Longer than the season, irregular ups and downs; periods of expansion and contraction.
  • Erratic/noise. Unexplained, random fluctuation.

Before estimating a series, it is necessary to decomposition these components. Because looking at the raw series and saying "it's falling" can be misleading: maybe you're just in a seasonal trough.

There is also the concept of stationarity: the statistical properties (mean, variance) of a series do not change over time. Most economic series are not stationary (constantly growing); Many models require differencing (subtracting one period from another) or stationarization with logarithms before building. AI recommends these steps, but knowing why they are needed protects you.

Tip: Always plot and decompose the series before predicting. An apparent structural break (e.g. a crisis or currency reform) will fool even the most advanced model. The chart is the cheapest diagnostic tool.

Models: from simple to complex, but first the benchmark

The golden rule in time series forecasting: always start with a simple benchmark model. The simplest forecast is the “naive forecast”: tomorrow will be equal to today (or seasonal naive: this month equals the same month last year). If a complex model cannot beat this naive prediction, complexity is futile.

Then frequently used methods:

  • ETS / Exponential smoothing. A family that softens level, trend and seasonality by weighting them.
  • CALLING. The classical model combining autoregressive (based on past values) and moving average components; seasonal version SARIMA.
  • Regression-based/explanatory models. Explaining a variable with other indicators (e.g. demand by income and price).

AI can code all of these in statsmodels (Python library). Your job is to select and validate models.

Backtest: test of prediction

It doesn't mean anything if a model "fits nicely" with historical data; Flexible enough to fit any model (this is called overfitting). The real question: how well does the model predict periods it has not seen? To measure this, you do backtesting: you split the data at a date, train the model with the previous part, have it predict the next part "as if it were the future" and compare it to reality. Error measures (for example, MAE — mean absolute error, or RMSE — root mean square error) allow you to compare the model to the benchmark.

Caution: Do not train the model with the data you evaluated. Measure prediction success only in periods not used in training. Otherwise you will deceive yourself; The model turns out great on paper but useless in reality.

Uncertainty: range, not point estimate

A single number (“inflation will be 24 percent by the end of the year”) exudes false certainty. The honest estimate includes a range and probability: "in the 21-27 percent band, the center scenario is 24 percent". Forecast uncertainty is expressed in the confidence intervals produced by the model; but the real uncertainty is greater than this, because model assumptions may also be wrong. Structural break (policy change, external shock) is the biggest risk that the model cannot see.

three mini cases

Case 1 — Failing to beat the benchmark. An analyst had the AI ​​build a complex SARIMA for monthly retail sales. In the backtest, the model's average absolute error was worse than the seasonal naïve forecast that said "this month is equal to the same month last year." The analyst abandoned the complex model; He took the naive guess as a basis and added an expert correction. Simplicity wins.

Case 2 — Structural break. An institution used the inflation model it trained with data before the exchange rate shock for the post-shock period. The model severely underestimated inflation because it assumed the dynamics of the past calm period. Lesson: the model assumes the world in which it is trained; When the world changes, the prediction collapses. If the economist looked at the graph, he would see the break.

Case 3 — Honesty of the range. An economist presented his year-end growth forecast to the management not as a single figure, but as "3.0-4.2 percent band, these are the underlying assumptions." At the end of the year, realization was 3.6 percent; It was in the band. If he had given a single number, he might have been labeled "wrong"; range and assumptions were both honest and maintained trust.

Model selection table

Status

proper start

note

Every guesswork

Naive / seasonal naive benchmark

The base to beat

Trend + seasonality, flat

ETS (exponential smoothing)

Easy to install and comment

Autocorrelated series

(S)ARIMA

Needs stabilization

There is an explanatory variable

Regression based

Predictors of the future must also

Suspicion of structural break

Model + expert correction

Pure model is not enough

Four copyable templates

1) Parsing and diagnosis:

Plot that monthly series [series], then separate it into trend/seasonality/residual components (statsmodels). Check if it is stationary (ADF test) and, if necessary, explain which transformation (log, difference) you recommend. Mark if there is a visible structural break in the chart.

2) Benchmark + model comparison:

First establish a seasonal naive benchmark forecast for this series. Then set up an ETS and a SARIMA. Compare all three based on MAE and RMSE with a backtest (testing the last 12 months). Tabulate the results and clearly state which model beat the benchmark.

3) Estimate and uncertainty range:

Forecast the next 6 periods for the model I chose and give 80%/95% confidence intervals. Present the estimate as a range, not as a single number. Make it clear that this range ONLY covers model uncertainty, not the risk of structural breakage/external shock.

4) Backtest reading:

Interpret these backtest results [table]. Does the model actually beat the benchmark, or is the difference statistically insignificant? State in which periods your model made the most mistakes and question the possible economic reason for this (crisis, seasonal change).

Weak prompt / Strong prompt

Weak prompt:

Guess this series.

Artificial intelligence builds a random model, does not backtest, gives an odd number; You don't know whether the model works or not.

Powerful prompt:

First decompose the current monthly inflation series and scan for breaks. Backtest ETS and SARIMA in the last 12 months against a seasonal naive benchmark, compare with MAE. Choose the model that beats the benchmark, give a 6 month forward forecast and put an 80% range. Write the risk of structural breakage as a separate warning. Show the code for each step and summary numbers that I can verify manually.

Common mistakes

  • Jumping into complex model without setting up benchmarks. Complexity does not equal success.
  • Evaluating the model on the data it trained on. Mistaking excessive compliance for success.
  • Giving a single point estimate. False certainty; range and assumption required.
  • Ignoring the structural break. Blindly carrying the past dynamic into the future.
  • Skipping stabilization. Fake relationships and distorted prediction.
  • Presenting the prediction as a prophecy. Hiding uncertainty and responsibility.

In summary

Time series forecasting is done by separating a series into its components, making it stationary, establishing a simple benchmark, comparing the models by backtesting, and presenting the result honestly with the uncertainty range. Artificial intelligence quickly generates the code for all these steps; But the responsibility for model selection, structural break judgment and forecasting lies with the economist. A prediction is not a prophecy, but a conditional and uncertain prediction.

Application task

Choose a monthly economic series (e.g. industrial production index). Separate and scan for breakouts with the 1st template, backtest ETS/SARIMA against the seasonal naïve benchmark with the 2nd template, produce a 6-month forward range forecast with the 3rd template. Note whether your model actually beats the benchmark and flag any structural breaks you see.

checklist

  • [ ] I plotted the series and diagnosed it in terms of trend/seasonality/break.
  • [ ] I have applied stationarization (log/difference) if necessary and I know the reason.
  • [ ] I set up a simple benchmark and compared the complex model against it.
  • [ ] I evaluated the model only during the periods when it was not in training (backtest).
  • [ ] I presented the estimate with an uncertainty range, not a single number.
  • [ ] I mentioned the structural break/external shock risk as a separate warning.
  • [ ] I maintained that the responsibility for prediction and final judgment lies with me.