← All methods

Regression · Free

Time-series linear model

OLS on trend plus Fourier seasonal terms, and optional regressors.

What it assumes

Linear trend plus Fourier seasonal terms; optional regressors.

When to use

Calendar seasonality with (or without) a covariate.

When to avoid

Strong nonlinearity or too few points for the design matrix.

Knobs

OLS on [1, t, sin/cos harmonics, X].

How it works

The time-series linear model is ordinary least squares on a design matrix: intercept, time index, sine/cosine harmonics for the seasonal period, and optional extra columns you selected in Excel. It is transparent and good for calendar seasonality with (or without) a covariate. Strong nonlinearity or too few rows for the columns will fail the fit.

Sample forecast question

Twelve monthly gas-use figures show a winter peak and a mild rise. What is the time-series linear model forecast for the next four months?

Step-by-step on these numbers

Sample series (therms)
PeriodActualFitted
Jan2222.02
Feb2423.91
Mar2828.17
Apr3635.84
May4848.05
Jun6262.04
Jul7069.99
Aug6665.87
Sep5252.27
Oct3837.72
Nov2828.17
Dec2423.95
Forecast
PeriodForecast95% interval
Jan23.3022.99 – 23.61
Feb25.1924.75 – 25.62
Mar29.4628.93 – 29.99
Apr37.1236.51 – 37.73

Parameters the engine found

  • intercept = 40.913
  • trend = 0.107
  • b0 = 40.913
  • b1 = 0.107
  • b2 = -0.845
  • b3 = -23.107
  • b4 = 1.340
  • b5 = 4.773
  • b6 = -0.227
  • b7 = -0.560
  • k = 8
  • m = 12
  1. The question

    Twelve monthly gas-use figures show a winter peak and a mild rise. What is the time-series linear model forecast for the next four months? Sample months: Jan=22, Feb=24, Mar=28, Apr=36, May=48, Jun=62, Jul=70, Aug=66, Sep=52, Oct=38, Nov=28, Dec=24 (therms).

  2. Design matrix

    OLS on [1, t, sin/cos harmonics for m = 12]. No extra regressor on this page (future X would be 0 if omitted). 8 coefficients.

  3. Fit

    Intercept = 40.913, trend (per period) = 0.107. Other Fourier coefficients are in the parameter table. Fitted values in the table are Xβ on the sample.

  4. Forecast

    Plug t = n, n+1, … into the same columns. Jan: 23.30; Feb: 25.19; Mar: 29.46; Apr: 37.12.

  5. Interval

    Residual σ = 0.156. For h = 1 the 95% band is [22.99, 23.61] around 23.30. The engine labels this a residual-Gaussian heuristic (σ√h), not a simulation interval.

Graph of this sample

Jan · 22 Dec Jan
Time-series linear model on the canned sample: actuals, fitted, and a 4-step forecast. Actual Fitted Forecast
The chart plots the canned table on this page (actuals, in-sample fitted, forecast, 95% interval). Not your Excel series. Free analysis never uploads raw data.

Educational only. Not investment, weather, or operational advice. In the add-in, rank is rolling-origin MASE — “best supported among candidates on this series.”

Use it in the Excel Add-in