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

46 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5 votes
0 answers
690 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
  • 77
5 votes
0 answers
246 views

Can you use a moving average as an instrumental variable?

I have panel data and am interested in changes in total expenditures. I would like to consider an instrumental variable approach to deal with an endogenous regressor – the short run elasticity of ...
user32881's user avatar
4 votes
0 answers
179 views

improve performance of finding rolling window maximum likelihood

There is data indexed by time: $$ D_1, D_2, D_3, ..., D_T $$ I have a model that I assume the parameter $\theta_t$ changes with time $t$. As a result, I adapt a rolling window strategy: $$ \theta_{...
wh0's user avatar
  • 431
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
3 votes
0 answers
159 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
3 votes
0 answers
300 views

What are the potential problems with a rolling regression?

I have two time series that co-move, say a currency and a commodity, and the currency is highly impacted by the commodity, but also other factors. I'd like to determine when the currency becomes too ...
user193776's user avatar
3 votes
0 answers
443 views

Good book / resource for learning about moving window PCA?

I would like recommendations on textbooks (or online resources) covering MWPCA theoretically and with application examples (preferably in R, but also in Python, Mathematica, Matlab). A brief intro: ...
3 votes
0 answers
2k views

Difference between recursive and rolling window estimation

I am trying to check if my Auto Regressive Distributed Lag (ARDL) model provides stable estimates over time. I am not sure if I should be using a recursive or rolling window method. I know that the ...
SidtheKid's user avatar
  • 133
3 votes
0 answers
382 views

Correcting for multiple testing on non-independent sliding windows

Question Values taken from adjecent windows in a sliding windows are corrolated. If I calculate a p-value from each window, how can I correct for the fact I have tested many windows, given that the ...
Ian Sudbery's user avatar
2 votes
1 answer
360 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
2 votes
0 answers
87 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
2 votes
2 answers
658 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
2 votes
2 answers
1k 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 ...
Nora's user avatar
  • 21
2 votes
2 answers
335 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, ...
Maxouille's user avatar
  • 121
2 votes
1 answer
41 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. ...
Stig Helweg-Jørgensen's user avatar
2 votes
0 answers
55 views

Picking the right prediction model

I am having a hard time trying to make/pick a prediction model in R. The data: I have information on 40 different players, with all their recorded performances(training loads) over the last season. ...
Danz's user avatar
  • 21
2 votes
0 answers
303 views

Use sliding window to find variance for seasonal time series in R

I would like to estimate the variance of a time series. Say, if the time series has a period of 24, and I want to estimate the variance using $$ \sigma_t^2 = \frac{1}{2k+1} \sum^k_{-k} (y_{t+24k} - \...
Jeannie's user avatar
  • 559
2 votes
0 answers
86 views

Comparing observed Vs predicted window overlap/intersection

I have a large number (~1.5 million) of protein sequences, each of them of different lengths.There are 6 schematic examples in the attached image. Within each of these sequences, there are >= 0 ...
AnandKSRao's user avatar
2 votes
0 answers
43 views

A Sliding Goodness of Fit Method? (Foray into the Stats Community Wielding only R-Squared)

I am a bit of a Stats idiot. I have two waveforms that I want to compare. One is an actual measurement, the other is a model of the first waveform which I calculate by convolving an impulse response ...
awinde's user avatar
  • 21
1 vote
0 answers
57 views

Transformation w/ Rolling Regression (Residual Function)

In a time series with OLS regression curve $\widehat Y$ (rolling linear regression), and with $n=20,$ what can I say about this transformation? This formula is similar to a differential minus its ...
NEO ULTRA's user avatar
1 vote
1 answer
44 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
1 vote
0 answers
48 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
  • 342
1 vote
0 answers
32 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
2 answers
802 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
50 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
1 answer
4k 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
1 vote
0 answers
350 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
  • 77
1 vote
0 answers
356 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,334
1 vote
0 answers
62 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
1 vote
0 answers
82 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
1 vote
0 answers
609 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 ...
thebilly's user avatar
  • 135
1 vote
0 answers
748 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 ...
Subi's user avatar
  • 11
1 vote
0 answers
115 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 ...
Ivan's user avatar
  • 141
1 vote
0 answers
47 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 ...
Mateusz Garbacz's user avatar
1 vote
0 answers
57 views

Critique my method for predicting easter product sales from daily data

I hope this question benefits the site as well as myself. Thanks ahead for your time. So I work for a company that sells (among a lot of things) personalized items specifically for Easter - stuffed ...
Kurt VonOhlen's user avatar
1 vote
0 answers
104 views

How to use rasters in R to create a logit model?

I created land-use rasters for the city of Montreal for 2012, 2014, and 2016; all of which I converted from vectors to rasters in QGIS. I want to create a logit model to predict land-use changes. I ...
HP-Nunes's user avatar
1 vote
0 answers
531 views

How to handle/preprocess time dependent features in a neural network

I want to use a neural network to model a biological continuous variable. This variable depends on a bunch of events that happened in the preceding hours, sometimes up to 24 hours, including the ...
twiz_'s user avatar
  • 111
1 vote
0 answers
1k views

Sliding window with labelled time series of sensor data

I'm using a sliding window to obtain features (like mean, varianve etc) of a labelled time series of sensor readings. The goal is to train a binary classifier (like linear regression or SVM) to detect ...
CShor's user avatar
  • 11
0 votes
0 answers
31 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
0 votes
0 answers
70 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
28 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
  • 557
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,334
0 votes
1 answer
161 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
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
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
0 votes
0 answers
433 views

Rolling window AR(2)-GARCH(1,1) VaR intuition query

I have an AR(2)-GARCH(1,1) model and I need to use a 1-day rolling window 1 -step ahead forecasts to calculate the 5% conditional VaR. I know how to calculate the VaR for 1-step ahead only - I ...
user avatar