Data Preprocessing

Format, plot, and transform time series data

Economic and financial time series data can require preprocessing or transforming before you can analyze or model them. While base MATLAB® has general purpose and timetable functionality for preprocessing or cleaning data (for example, the log function removes an exponential trend from series and Data Cleaner enables you to clean messy data interactively), Econometrics Toolbox™ has specialized functionality for preprocessing financial time series. For example, you can obtain a common or desired time base by aggregating multiple series, convert price series to growth rates, or decompose series into additive trend and cyclical components.

Apps

 Econometric Modeler Analyze and model econometric time series

Classes

 LagOp Create lag operator polynomial

Functions

expand all

 convert2daily Aggregate timetable data to daily periodicity (Since R2021a) convert2weekly Aggregate timetable data to weekly periodicity (Since R2021a) convert2monthly Aggregate timetable data to monthly periodicity (Since R2021a) convert2quarterly Aggregate timetable data to quarterly periodicity (Since R2021a) convert2semiannual Aggregate timetable data to semiannual periodicity (Since R2021a) convert2annual Aggregate timetable data to annual periodicity (Since R2021a)
 price2ret Convert prices to returns ret2price Convert returns to prices lagmatrix Create lagged time series data
 hpfilter Hodrick-Prescott filter for trend and cyclical components bkfilter Baxter-King filter for trend and cyclical components (Since R2023a) cffilter Christiano-Fitzgerald filter for trend and cyclical components (Since R2023a) hfilter Hamilton filter for trend and cyclical components (Since R2023a)
 recessionplot Overlay recession bands on time series plot
 filter Apply lag operator polynomial to filter time series isStable Determine stability of lag operator polynomial reflect Reflect lag operator polynomial coefficients around lag zero toCellArray Convert lag operator polynomial object to cell array isEqLagOp Determine if two LagOp objects are same mathematical polynomial isNonZero Find lags associated with nonzero coefficients of LagOp objects minus Lag operator polynomial subtraction mldivide Lag operator polynomial left division mrdivide Lag operator polynomial right division mtimes Lag operator polynomial multiplication plus Lag operator polynomial addition