# Questions tagged [moving-window]

A window is a fixed-length subset of consecutive observations of a time series. The window is moved along the time series at a constant rate. AKA "rolling window".

81 questions
Filter by
Sorted by
Tagged with
0answers
16 views

### Out of sample testing and tail function

Below you see an out of sample rolling window estimation I found here: https://www.r-bloggers.com/2017/11/formal-ways-to-compare-forecasting-models-rolling-windows/ Here is my question: I know the ...
1answer
24 views

### Rolling fixed window scheme for GARCH forecasting

I'm working on my bachelors thesis which mainly revolves around this paper: https://www.mdpi.com/2225-1146/4/1/3/htm Shortly after describing the dataset in 3.1 the authors mention that they use a ...
2answers
93 views

### Root-mean-square error when having multiple prediction horizons

I have a basic question about the root-mean-square error (RMSE). I have a prediction using an ARIMA model. I predicted a time series and use a rolling-horizon approach with overlapping or non-...
1answer
68 views

### Expected value of rolling variance/standard deviation of an AR(1) process

Consider a random variable following an AR(1) model: $$x_t = \mu+\rho x_{t-1} + \epsilon_t$$ Assumme that $\epsilon_t$ follows $N(0,\sigma^2_\epsilon)$. Now consider the rolling variance and/or ...
0answers
16 views

### How to calculate the percentage of change between two dates without being fooled by trend effects?

I have a dataframe of sales per store and per item between month 0 and month 33, these sales represent a non-stationary time series. I want to calculate how much these sales are increasing. But I don'...
0answers
15 views

### ARMAX model with rolling window for predicting inflation

I'm trying to build a model that is able to predict inflation on t+1. I have data for several variables, like employment, crude oil prices, interest rates. And inflation obviously. The data is ...
0answers
4 views

### Sliding window output general formula

If you have an input of dim 6x1 and target 6x1 using sliding window with sequence length 2 and stride 1, the output is of ...
0answers
73 views

### What is the difference between sliding, rolling and expanding window in Time series forecasts?

What exactly is the difference between sliding, rolling and expanding windows in time series forecasting? Are rolling and expanding windows just subsets of sliding window? And which one of those ...
0answers
6 views

### why is the signal divided into epochs in EEG classification?

I'm new in EEG signal classification. Studying the literature on this topic, I wonder why the EEG signals are divided in epochs, so, instead of classifying the whole signal all at once, we usually ...
0answers
26 views

### Optimal window size for time series

How to determine the optimal window size for time-series data. The best/optimal window size will give an effective prediction. The approach I came across in my read is Approach 1: Have a set of window ...
1answer
42 views

### Discovering peaks/patterns in time-series and clustering them

I have a dataset which contains minute level sensor measurements. Sample is shown here: To me useful information are these peaks in time series, mostly their peak and duration. My idea is to take out ...
1answer
74 views

### Moving Average window

I am working with a multivariate time series problem which I try to predict 1 hour in the future. I am planning to use moving average of the features as separate new features. But I do not know if ...
0answers
20 views

### Which modelling method to use for this time series data?

I have a time series data of reaction times (RTs) from a psychophysics study. The RTs are influenced by whether a stimulus is presented to the left or right (binary predictor). Although the RTs are ...
0answers
32 views

### Is there a way to deal with spiking growth rates due to small sample numbers?

I'm looking at plotting county coronavirus case density growth rates (moving 7 day window) and am finding that when cases first appear the new case growth rate is very large due to the fact that there ...
0answers
40 views

### How does choosing an even window size actually add a cyclical component to the model?

I am new to Time Series Analysis. Say, we have a time series $(y_{t})_{t}$ that we want to filter with a moving average filter. I have been told that we should choose the window size $L$ of the filter ...
0answers
255 views

### Walk Forward validation window for time series with redraw

I'm looking to perform walk forward validation on my time-series data. Extensive document exists on how to perform rolling window: or expanding window But this validation does not correspond ...
1answer
21 views

### Does the method of reruning GARCH models every day (to update parameter values and improve out-of-sample forecasting performance) have a name?

It is my understanding that normally GARCH models make forecasts for say T-K days ahead. Instead of doing that I would like to use the data for days 1, 2, ...,k in my dataset to fit a GARCH model to ...
0answers
50 views

### Moving window multiple linear regression

I would like to perform a multiple linear regression on a time-series in order to find the variables having the most influence on the output. The dataset is quite small: 21 times 16 windows.The 16 ...
0answers
27 views

### Brief explanation of sliding window Pearson's correlation?

I have come across a few research articles I'm trying to understand that use sliding window Pearson's correlation. However, in my research I have yet to come across a basic explanation of what problem ...
1answer
82 views

### Rolling autocorrelation vs whole series autocorrelation

Suppose we have some financial time series. When we calculate the standard ACF, $\mu$ is considered as the average of all series' values. However, if we have a volatile series, the average can be ...
0answers
15 views

### Holt-Winters Multiplicative Alpha Beta Gamma [closed]

I need to create a table with Holt-Winters Alpha, Beta and Gamma (ABG) I have the following code ...
0answers
33 views

### How to reflect more global patterns in timeseries?

I have some signal data of a robot recorded in every minute each day. e.g., ...
1answer
479 views

### Is moving average(sliding window) a smoothing technique or forecasting technique?

The rolling average method is mostly used to produce a smoothed series by removing noise. For ex- 3 window moving average, in general practice, the output for the fourth period is the 3 window moving ...
1answer
96 views

### How do we forecast using 3 point moving average?

X<- c(3,6,8,10,6,5) If I want to forecast using 3point moving average I use ma(X,3) from forecast package So this is going to give a series of smoothed average. If I want to forecast further 2 ...
1answer
228 views

### Efficient online (rolling window) estimation of a GARCH model

I have a time series $x_t$ of length $n$. I would like to model it using rolling window approach with window length (width) $w$: window $1$: $x_1,\dots,x_w$, window $2$: $x_2,\dots,x_{w+1}$, $\dots$, ...
1answer
226 views

### Out-of-sample Rolling window forecast with ARIMA(0,0,0) with non-zero mean

I am doing a rolling window out-of-sample forecast and have fitted an ARIMA(0,0,1) model to a first difference time series. People argue that sometimes simpler models are better than more complicated ...
0answers
45 views

### Counting occurrences using n-grams

I was asked to do the following exercise: Consider the sequence IROIRDXMIRDOMORIORMTDMMDMWBIRQGDM Count the number of occurences of IRDM using: n-grams ...
1answer
164 views

### Computation of multiple linear OLS regression with rolling window and/or update

How can I efficiently calculate an OLS fit for N multiple variables for a rolling window? I've worked out how to do it for 1 and 2 variable linear fits, I'd like to extend to the general case of N ...
1answer
118 views

### What is the relationship between average of a rolling intercept and the intercept from a regression over the entire period?

If i calculate rolling (e.g. 3 periods back) intercepts for a time series using OLS, is the average of these rolling intercepts then in some way related to the intercept from an OLS of the entire ...
1answer
22 views

### Ranking with multiple weights/ features

We have entities where every entity has start ($s_i$) and end ($e_i$) times and count $c_i$. An entity is important if its interval ($e_i - s_i$) is large and if its $c_i$ is large. Here's what I ...
1answer
1k views

### ARIMA + Rolling Window

I'm currently working on building an ARIMA+GARCH model using R. My dataset consists of the logarithmic returns of the Dow Jones index for a period of 11 years 2005-2016, however, it's worth noting ...
1answer
133 views

### How does the sliding window work?

I am not sure how the "Sliding window" method work. Let's assume I have a dataset of number of logins by hour. a) A window of 24hours to predict the next 24h? b) A window of 24h to predict the next ...
0answers
168 views

### What is the difference between a discrete and continuous rolling window?

What I have read so far suggests that a discrete rolling window is say a yearly window, calculating somethig every year, which is from 01-01/31-12 and a continuous rolling window is a window that ...
1answer
199 views

### How to compute the change of Ridge regression solution when one row of data changes?

I understand that $\boldsymbol{\beta} = (X^TX + \lambda I)^{-1}X^T\mathbf{ Y}$ is the closed form solution of Ridge regression. So sometimes, when I run a rolling window, meaning everytime I run the ...
0answers
495 views

### How to make predictions on sliding window?

I need help understanding how to construct sliding windows as well as how to perform final prediction. Any help is appreciated! I have a dataset from sensing data with multiple features aggregated ...
1answer
2k views

### What is rolling mean and standard deviation in terms of stationarity?

I would like to know what a rolling mean and rolling S.D means in terms of achieving stationairty concerning a time series? I ran an ADF test and it told me my time series was stationary however, by ...
0answers
43 views

### Classify time series with unequal lenghts [closed]

I have a set of time series sensor measurements (acceleration and gyroscope readings) for driving events (harsh acceleration, harsh brake …) with the type, start and end of each event. I need to ...
0answers
62 views

### Average time series forecast errors from cross-validation with rolling origin

I'm calculating the MAPE and RMSE over a rolling origin cross-validation with fixed forecast interval for several models. For example, for a daily series with 3 years, I'm training my model with 2 ...
2answers
417 views

### Rolling Window Forecasting with ARIMAX while supplying actual values

I am comparing different exogenous variables in how good they support the forecast of the monthly seasonal adjusted unemployment rate. All my data is monthly (2006-01-01 until 2018-09-01) and ...
1answer
5k views

### How to decide moving window size for time series prediction?

I have a model to predict +1 day ahead of this time series. Looking at the chart you can notice some seasonality every 5 days. I suspect using a moving window as training set could help me making a ...
1answer
129 views

### DNN methodology and feature concatenation

I'm using someone else's job and I have a question that I cannot solve. This work uses a DNN to match an electrical resistance to a bend angle. This is not very important, just for the context. So,...
1answer
281 views

### Impact of window size on estimated volatility using SMA or EWMA

When calculating volatility (either using an SMA or EWMA approach), what impact does the window size have on the volatility estimate?
1answer
163 views

### Markov Switching GARCH - Expanding or Rolling window forecasting?

When modelling volatility do people tend to use expanding or sliding windows to predict the performance of MS GARCH models?
1answer
119 views

### Rolling sum of 2 sample KS test results

In order to compare two lists of samples from 'before-treatment' and 'after-treatment', I am doing a two sample KS test using the ks_2samp function from Python's scipy.stats package which gives me the ...
1answer
294 views

### Moving window time series

I am working on some computations for large datasets of market data and I was wondering is there is a simple way to apply the following logic without using heavy looping. I will simplify the problem: ...
1answer
37 views

### Using a recoded window 10 days back in a GAM-model, is that a double whammy or is it OK to do?

I'm formulating a prediction in a logistic reression type in a GAM model. ...
1answer
777 views

### Supervised learning: setting labels on sliding windows of sensor data

Suppose that I have a set of accelerometer data collected with one sensor and one label for each measured data point. These labels describe different states of my system e.g., \$state_A, state_B, ...
1answer
1k views

### Detrending using moving average

In Terrence C. Mills book Im currently reading The Foundation of Modern Time Series Analysis on while discussing Person's detrending methods, he mentions the following result. ... Concider the ...
0answers
39 views

### How to perform windowframing for timeseries prediction

I am working on a market prediction project based on the timeseries data. Essentially i am trying to windowframe the data and predict whether the price goes up or down in an hour, 30 minutes and 15 ...