Skip to main content

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".

Filter by
Sorted by
Tagged with
1 vote
1 answer
41 views

Strange increasing in $R^2$ when MAE and RMSE worsened for OLS

I am currently working on my thesis, which involves using machine learning to predict non-stationary and seasonal time series. I am encountering some results that I cannot explain. While I cannot go ...
M. Hansen's user avatar
3 votes
0 answers
27 views

Determine a robust trend from noisy time series data, when start and end years have a material effect

I have about 20 years of data, each year has a number of observations. If I put a linear trend through the data, I get a trend, and this trend differs based on the the choice of start and end year, ...
Mark Neal's user avatar
  • 131
0 votes
0 answers
30 views

Autoregession meets multiple regression? - Help with verbiage and approach

Needing some help with verbiage and opinions on how I am approaching this model. I have counts of people over the past 24 months. month count 1 100 2 105 ... ... 24 200 First, I reverse the ...
Tyler Brown's user avatar
1 vote
1 answer
29 views

How to interpret the differences in estimated variances?

I estimated the variance of Bitcoin in several ways using the var command in R, and within a GARCH model. I get series that look a bit similar, but the y-axis gives ...
krauuuus's user avatar
0 votes
0 answers
38 views

Data leakage in time series forecasting framed as a supervised learning problem

Suppose that I have a simple univariate time series. My goal is to use the value of 3 consecutive days to predict the value of the fourth day. I built my dataset by applying a rolling window that ...
Ray's user avatar
  • 11
0 votes
0 answers
24 views

Stationarity and moving standard deviation

Suppose $\{X_t\}$ is stationary process. We observe a sample of $N$ observations from the process, i.e., $x_1, x_2, ..., x_N$. The stationarity property implies that the distribution doesn't change ...
Sane's user avatar
  • 489
1 vote
1 answer
63 views

Smoothing out target variable for spiky demand forecasting

I am trying to predict ambulance demand for the next hour, for a city area in the USA, based on previous demand, weather, large people gatherings, and similar spatio-temporal factors - using Machine ...
Nadir Bašić's user avatar
4 votes
1 answer
109 views

In sliding window regression, what is the best way to select my training window and test set size?

I am trying to forecast an index option's implied volatility using a sliding window regression and I'm a little confused on how I can go about cross validating with respect to the training and test ...
sixth-sense-81's user avatar
0 votes
0 answers
7 views

Time based cross-validation for EOM patterns

I want to evaluate different models (ARIMA, MLP, LSTM, regression, etc.) on their performance to predict/forecast stock prices in a period (horizon) of 7 days around month-end. The data for these ...
koder124's user avatar
0 votes
1 answer
88 views

Max of the running average of the kth through nth elements for a given probability distribution

This question is based slightly on https://www.reddit.com/r/AskStatistics/comments/16bqit0/calculating_probability_when_phacking_is_allowed/ Given a variable $X$, let $A_j$ be the average of $X_1$ ...
Barry Carter's user avatar
0 votes
0 answers
31 views

Dynamic Time Warping with rolling window

I have two time series, lets say X and Y with 127 and 64 observations in each respectively. I have applied DTW with global constraint to get the distance and then further used that distance to ...
Ali Inayat's user avatar
1 vote
1 answer
135 views

rolling mean series - strong autocorrelation

I need to works with time-series of rolling means of a certain variable that comes from the data. I have this rolling means for N different individuals. Call them Y. I would like to test some ...
user9875321__'s user avatar
0 votes
1 answer
126 views

Implementing Random Forest rolling window forecast in R [closed]

I want to forecast a dependent variable and I have some independent variables. First I shifted the dependent variable up, such that I have a supervised problem. For instance in January 2000 the ...
walk_forward_window's user avatar
3 votes
0 answers
114 views

Fixed vs rolling forecasts: Empirical evidence

Many sources online recommend that we use a rolling window to make forecasts. As I am in a choice between using a fixed window and a rolling window for my data I am trying to find any empirical ...
Johanna W's user avatar
1 vote
0 answers
41 views

What is the probabilistic meaning of moving window statistics?

Moving window statistics (see this, for example) are sample statistics calculated over moving/rolling windows over a time-series. For example, given the time-series $\{x_1,x_2,\dots\}$ one can ...
ForceBru's user avatar
  • 330
0 votes
2 answers
620 views

Exact steps for rolling window CV evaluation or sliding window CV evaluation for SARIMA

So far I have using this process: 1)split data into training and test 2)do model selection(p,d,q, P,D,Q,etc) using training data(in this case, I used autoarima) ...
a12345's user avatar
  • 65
1 vote
1 answer
333 views

Kernel Smoothing for Time Series data [closed]

I have generated a time series data set of measurements that are a bit noisy and I want to apply kernel smoothing to the data. My time series data is not regular however, meaning that the time ...
Jade131621's user avatar
0 votes
0 answers
31 views

What is it called when an outlier falls out of a rolling window statistical calculation?

I have a time series $X_t \sim N(0, 1)$. There is a single outlier at index 347, at 8.5 standard deviations from the mean. If I now compute a rolling window standard deviation of $X_t$ with window ...
PyRsquared's user avatar
  • 1,314
1 vote
0 answers
31 views

A question about an estimation using moving average and moving standard deviation?

Given a time series data $\{X_t\}_{t = 0}^\infty$, what does its moving average and moving standard deviation estimate when there is no assumption that $\mathbb{E}[X_t] = \text{const}, \forall t$? ...
Zhang Qifan's user avatar
1 vote
0 answers
185 views

Rolling z-score or z-score? [closed]

Suppose that we have some time series data, in what context we use rolling z-score and when do we use z-score?
user398843's user avatar
1 vote
1 answer
27 views

Impact of religious holidays whose dates shift in the Gregorian calendar [closed]

I need to model and predict a quantitative variable that is heavily impacted by events, parties and celebrations. For I seek first to know the impact that has the religious festivals, the ramadan and ...
PrivChic's user avatar
0 votes
1 answer
158 views

Calculate the daily standard deviation for time series (stock market) in R

I´m modeling with diffrent GARCH-Models the daily standard deviation of a stock market. That includes a rolling forecast model of the daily standard deviation. This works pretty well so far. To ...
chris_kentucky's user avatar
1 vote
2 answers
701 views

How to analyse results of classification for time series + sliding windows

Here is my context: I have a time series composed of only 1 features. I want to be able to classify between two classes. To get more information out of these data, I am using a sliding time windows. ...
Adrien's user avatar
  • 19
1 vote
0 answers
47 views

Rolling autoregression coefficient

I was reading a paper and I saw that they run a 3-year rolling autoregression for 20 years (using for example 2013-2016 as trailing and 2016-2019 as forwarding) and got only one beta coefficient and ...
mo1965's user avatar
  • 43
1 vote
2 answers
904 views

Cross Validation for Time Series Classification (Not Forecasting!)

Is it possible to use regular k-fold cross validation where the folds contain entire time series in time series classification? I'm asking because most sources discussing cross validation with time ...
perceptronEnthusiast420's user avatar
2 votes
1 answer
383 views

Lag selection and model instability for ARIMA-GARCH in rolling windows for forecasting

I'm to produce rolling forecasts with an ARIMA-GARCH model using a moving window size of 1000. Given that structural changes in the series might take place at some point in the forecast horizon, is ...
Crib's user avatar
  • 33
1 vote
1 answer
3k views

Difference between use cases of expanding and rolling window in backtesting

I was reading about different variants of backtesting in time series- expanding window & rolling window. I could find in texts about when to use which, but still I'm sort of unanswered. Here's ...
SRISHTI GUREJA's user avatar
5 votes
0 answers
660 views

Predict churn in a range of time after observation window is finished

I'm building a churn model. Each user's historic data (observation window) is a constant period, but each observation window contains different dates. For example the next figure: Let's say, that the ...
Amit S's user avatar
  • 57
1 vote
0 answers
327 views

what is it an activity window in churn model?

I know that in a churn model many times you define an observation window (historic data) and a performance window (also dependent window, or response window). I have read an article that the authors (...
Amit S's user avatar
  • 57
1 vote
1 answer
493 views

ARIMA accuracy measures, rolling forecast

Regarding ARIMA model selection and especially accuracy measures several questions came into my mind. To shortly summarize, in my understanding, after necessary transformations/differencing, p and q ...
EEEE77's user avatar
  • 59
1 vote
1 answer
232 views

Modifying tsCV function

I tried to modify the tsCV function to seperate between xreg_subset and xreg_future as Im going to use forecasted data for validate and test samples: ...
Shwan's user avatar
  • 25
1 vote
0 answers
337 views

Rolling forecast vs. static training data for financial timeseries?

I want to train a statistical model to predict financial asset returns. I'm wondering whether it would be more effective to train a rolling forecast model rather than training a single model with a ...
PyRsquared's user avatar
  • 1,314
2 votes
1 answer
4k views

Rolling vs Recursive vs Fixed Window Regression

What precisely are the differences between rolling, recursive and fixed window regression? As far as I understand, recursive: we train on a period $y(0)$ to $y(n)$ then predict $\hat{y}(n+1)$. Then ...
charelf's user avatar
  • 243
1 vote
0 answers
60 views

MSGARCH fitting doesn't work for the specific part of the data

I'm trying to do rolling (expanding) window forecast with MSGARCH and the model is failing for very specific $i$. For example I get error for $i=14$ and $i=30$. Data is snp500 returns data between ...
Selena Pepic's user avatar
2 votes
2 answers
861 views

Optimal window size for contextual outlier detection

I am looking for methods to detect univariate contextual outliers in time series data. One example application is data from industrial plants in different (unknown) operation modes or slow trends or ...
HansHupe's user avatar
  • 153
3 votes
2 answers
2k 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-...
PeterBe's user avatar
  • 392
2 votes
1 answer
222 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 ...
RVA92's user avatar
  • 139
1 vote
1 answer
316 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 ...
SirDawar's user avatar
3 votes
1 answer
1k 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 ...
CheeseBurger's user avatar
0 votes
0 answers
34 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 ...
jport's user avatar
  • 101
2 votes
0 answers
82 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 ...
MinaThuma's user avatar
  • 139
0 votes
1 answer
138 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 ...
BillB's user avatar
  • 89
2 votes
2 answers
630 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 ...
Nik's user avatar
  • 21
1 vote
0 answers
150 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 ...
ron4's user avatar
  • 11
0 votes
0 answers
37 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., ...
EmJ's user avatar
  • 602
3 votes
1 answer
3k 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 ...
Manisha's user avatar
  • 80
1 vote
2 answers
907 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 ...
Manisha's user avatar
  • 80
3 votes
1 answer
931 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$, ...
Richard Hardy's user avatar
1 vote
1 answer
691 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 ...
endorphinus's user avatar
1 vote
0 answers
80 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 ...
user8804's user avatar