Skip to main content
XenonStack

Enterprise AI

XenonStack Use Case Time Series Forecasting Analysis: VAR Approach

| Published | Updated

Time Series Forecasting Analysis: VAR Approach
5:34
Time series forecasting layers: minute-level data, pattern checks, VAR or supervised model, ten-step forecast

Key takeaway

  • Forecast ten future values for each symbol and category pair: compare supervised learning with a VAR model, and check trend and seasonality first.
. #}

Time series forecasting uses a record of values taken at regular intervals to predict the next values in the sequence. This use case forecasts ten future values of one target column for every combination of two categorical keys in a large, minute-level sensor or market dataset.

It is written for data scientists and engineering leads who must choose between turning a forecasting problem into supervised learning and using a multivariate model such as vector autoregression (VAR). It covers the data challenge, both approaches, pattern analysis, where AI agents fit and what to check first.

What is time series forecasting?

A time series is data recorded at regular intervals of time. Forecasting predicts future values from patterns in that history. In Forecasting: Principles and Practice, a trend is a long-term increase or decrease in the data, and a seasonal pattern has a fixed and known period tied to the calendar. A cycle rises and falls without a fixed frequency, which is how it differs from seasonality.

What is the forecasting problem in this use case?

The dataset holds sensor or stock market readings with about 250 numeric variables and a size of 15 GB. Two categorical variables, a symbol and a category, and a time stamp complete each record. There are 22 unique symbols and seven unique categories, recorded every minute. The target is to forecast ten future values of one column, called val, for each symbol and category pair.

  • Very wide data: hundreds of variables that may move together.
  • Many separate series: one for every symbol and category pair.
  • A fixed forecast horizon of ten steps for each pair.

How do the two forecasting approaches work?

There are two ways to solve this. The first converts the time series into a supervised learning problem. The second models the variables together with a VAR model.

Two-column diagram comparing supervised learning steps with VAR model steps for time series forecasting.
QuestionApproach 1: supervised learningApproach 2: VAR model
IdeaReshape the series into rows of inputs and a targetExtend one-variable autoregression to several variables
Data preparationConversion step neededNo conversion to supervised data
Future valuesNeeds values for all independent variablesProduced by the model itself
InterdependenciesMust be encoded as featuresConsidered by the model

The statsmodels documentation describes VAR as one way of estimating relationships between time series and their lagged values. It assumes the series are stationary, says that choosing the lag order can be difficult, and supports information-criteria selection. Its forecast method takes the last observations as initial values.

How does pattern analysis fit in?

Pattern analysis identifies the nature of the sequence of observations and supports forecasting of future values. A series contains systematic components that can be identified and random noise that makes the pattern harder to see. The two main components are trend and seasonality.

Trend analysis describes the trend as a function. A log or exponential transformation can remove non-linearity, and a moving average, simple or weighted, smooths errors in the trend. Seasonality analysis uses autocorrelation correlograms to display serial correlation across consecutive lags, then removes serial dependencies and examines partial autocorrelations.

Where do AI agents fit?

A forecast is only useful when someone acts on it. An AI agent can run the forecast on schedule, compare new readings with the predicted ones, and raise a case when they diverge. Each agent decision then depends on the data and rules behind the forecast. ElixirClaw is XenonStack's AI agents computing platform, and ElixirData is its Context OS for governed data.

What should you check before choosing an approach?

  1. Test whether each series is stationary, and transform it if not.
  2. Decide whether you can supply future values for the independent variables; if not, favour VAR.
  3. Select the lag order with an information criterion and compare it with a simple baseline.
  4. Hold out the most recent period to test the ten-step forecast for each pair.
  5. Plan how forecasts are monitored and retrained as patterns change.

To map one decision your agents make from a forecast, and the data and policy it depends on, book a Context Workshop. See what happens in the workshop.

Frequently asked questions

What is the difference between trend and seasonality?

A trend is a long-term increase or decrease in the data. Seasonality is a pattern that repeats at a fixed and known period tied to the calendar.

When should you use a VAR model?

Use it when several variables influence each other and you want forecasts without converting the data to supervised learning. It considers the interdependencies in the data.

Why convert a time series to supervised learning?

It lets you apply standard supervised models, but it needs values for all the independent variables at prediction time.

What does a correlogram show?

An autocorrelation correlogram displays serial correlation for consecutive lags, which helps identify seasonality and serial dependence.

Where do AI agents fit in forecasting?

Agents can run forecasts on schedule, compare them with new readings and raise cases when they diverge, using governed data.

Ready to put AI agents to work? See an ElixirClaw demo: the agentic OS to build, orchestrate and govern AI agents across your enterprise systems.

Table of Contents

dr-jagreet-gill

Dr. Jagreet Kaur

Chief AI Officer, XenonStack

LinkedIn profile

Dr. Jagreet Kaur specializing in Generative AI for synthetic data, Conversational AI, and Intelligent Document Processing. With a focus on responsible AI frameworks, compliance, and data governance, she drives innovation and transparency in AI implementation

Get the latest articles in your inbox

Subscribe Now

Interested in solving your challenges with the XenonStack team?
Get Started

Tell us about you and your priorities so we can prepare the right conversation. It takes about 2 minutes.

Please Select your Industry
Banking
Fintech
Payment Providers
Wealth Management
Discrete Manufacturing
Semiconductor
Machinery Manufacturing / Automation
Appliances / Electrical / Electronics
Elevator Manufacturing
Defense & Space Manufacturing
Computers & Electronics / Industrial Machinery
Motor Vehicle Manufacturing
Food and Beverages
Distillery & Wines
Beverages
Shipping
Logistics
Mobility (EV / Public Transport)
Energy & Utilities
Hospitality
Digital Gaming Platforms
SportsTech with AI
Public Safety - Explosives
Public Safety - Firefighting
Public Safety - Surveillance
Public Safety - Others
Media Platforms
City Operations
Airlines & Aviation
Defense Warfare & Drones
Robotics Engineering
Drones Manufacturing
AI Labs for Colleges
AI MSP / Quantum / AGI Institutes
Retail Apparel and Fashion

Continue