Main Content

Data Preprocessing

Format, plot, and transform time series data


Econometric ModelerAnalyze and model econometric time series


LagOpCreate lag operator polynomial


expand all

convert2dailyAggregate timetable data to daily periodicity
convert2weeklyAggregate timetable data to weekly periodicity
convert2monthlyAggregate timetable data to monthly periodicity
convert2quarterlyAggregate timetable data to quarterly periodicity
convert2semiannualAggregate timetable data to semiannual periodicity
convert2annualAggregate timetable data to annual periodicity
price2retConvert prices to returns
ret2priceConvert returns to prices
lagmatrixCreate matrix of lagged time series
hpfilterHodrick-Prescott filter for trend and cyclical components
recessionplotOverlay recession bands on time series plot
filterApply lag operator polynomial to filter time series
isStableDetermine stability of lag operator polynomial
reflectReflect lag operator polynomial coefficients around lag zero
toCellArrayConvert lag operator polynomial object to cell array
isEqLagOpDetermine if two LagOp objects are same mathematical polynomial
isNonZeroFind lags associated with nonzero coefficients of LagOp objects
minusLag operator polynomial subtraction
mldivideLag operator polynomial left division
mrdivideLag operator polynomial right division
mtimesLag operator polynomial multiplication
plusLag operator polynomial addition

Examples and How To

Prepare Time Series Data for Econometric Modeler App

Prepare time series data at the MATLAB® command line, and then import the set into Econometric Modeler.

Import Time Series Data into Econometric Modeler App

Import time series data from the MATLAB Workspace or a MAT-file into Econometric Modeler.

Plot Time Series Data Using Econometric Modeler App

Interactively plot univariate and multivariate time series data, then interpret and interact with the plots.

Transform Time Series Using Econometric Modeler App

Transform time series data interactively.

Nonseasonal Differencing

Take a nonseasonal difference of a time series.

Nonseasonal and Seasonal Differencing

Apply both nonseasonal and seasonal differencing using lag operator polynomial objects.

Moving Average Trend Estimation

Estimate long-term trend using a symmetric moving average function.

Seasonal Adjustment Using a Stable Seasonal Filter

Deseasonalize a time series using a stable seasonal filter.

Seasonal Adjustment Using S(n,m) Seasonal Filters

Apply seasonal filters to deseasonalize a time series.

Parametric Trend Estimation

Estimate nonseasonal and seasonal trend components using parametric models.

Using the Hodrick-Prescott Filter to Reproduce Their Original Result

Use the Hodrick-Prescott filter to decompose a time series.

Specify Lag Operator Polynomials

Create lag operator polynomial objects.


Econometric Modeling

Understand model-selection techniques and Econometrics Toolbox™ features.

Econometric Modeler App Overview

The Econometric Modeler app is an interactive tool for visualizing and analyzing univariate time series data.

Stochastic Process Characteristics

Understand the definition, forms, and properties of stochastic processes.

Data Transformations

Determine which data transformations are appropriate for your problem.

Trend-Stationary vs. Difference-Stationary Processes

Determine the characteristics of nonstationary processes.

Time Series Decomposition

Learn about splitting time series into deterministic trend, seasonal, and irregular components.

Moving Average Filter

Some time series are decomposable into various trend components. To estimate a trend component without making parametric assumptions, you can consider using a filter.

Seasonal Filters

You can use a seasonal filter (moving average) to estimate the seasonal component of a time series.

Seasonal Adjustment

Seasonal adjustment is the process of removing a nuisance periodic component. The result of a seasonal adjustment is a deseasonalized time series.

Hodrick-Prescott Filter

The Hodrick-Prescott (HP) filter is a specialized filter for trend and business cycle estimation (no seasonal component).

Time Base Partitions for ARIMA Model Estimation

When you fit a time series model to data, lagged terms in the model require initialization, usually with observations at the beginning of the sample.

Featured Examples