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
2 answers
804 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. ...
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 ...
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 ...
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 ...
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 ...
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, ...
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 ...
2 votes
2 answers
1k 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, ...
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 ...
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, ...
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 ...
1 vote
1 answer
422 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 ...
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 ...
1 vote
2 answers
974 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 ...
1 vote
1 answer
32 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 ...
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 ...
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 ...
1 vote
1 answer
96 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 ...
3 votes
1 answer
152 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 ...
22 votes
3 answers
8k views

I'm getting "jumpy" loadings in rollapply PCA in R. Can I fix it?

I have 10 years of daily returns data for 28 different currencies. I wish to extract the first principal component, but rather than operate PCA on the whole 10 years, I want to rollapply a 2 year ...
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$ ...
1 vote
1 answer
224 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 ...
0 votes
1 answer
157 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 ...
0 votes
2 answers
812 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) ...
3 votes
0 answers
160 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 ...
1 vote
1 answer
4k views

Rolling forecasts: training versus forecast accuracy evaluation

Questions: Are rolling forecast examples (like the ones below) only useful for evaluating a model's accuracy, or can a rolling forecast be used to train a model? Are models trained using a rolling ...
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 ...
0 votes
1 answer
946 views

Forecast evaluation for rolling forecast [closed]

I have rolling forecast for each month. I would like to do some forecast evaluation. How do I do this?
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 ...
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 ...
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$? ...
1 vote
0 answers
229 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?
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 ...
2 votes
1 answer
435 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 ...
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 ...
1 vote
2 answers
944 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 ...
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 ...
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 ...
2 votes
2 answers
262 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 ...
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 ...
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 (...
1 vote
1 answer
554 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 ...
3 votes
1 answer
978 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$, ...
9 votes
1 answer
15k 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 ...
1 vote
1 answer
236 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: ...
3 votes
1 answer
1k 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 ...
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 ...
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 ...
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 ...
11 votes
4 answers
7k views

Tuning an exponential moving average to a moving window mean?

The alpha parameter of an exponential moving average defines the smoothing that the average applies to a time series. In a similar way, the window size of a moving window mean also defines the ...