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
0 votes
0 answers
13 views

Rolling regression CAPM

Anyone has an idea how to compute the rolling CAPM? I know how to calculate rolling coefficients, but I do not know how can I compute one value of the cost of equity using rolling regression. to ...
user avatar
  • 11
0 votes
0 answers
9 views

Windowing timeseries classification data

INTRODUCTION: So basically, I have a dataset with 6 columns and around 10k rows. The output column is a label corresponding to every row, with the labels being 0 and 1. The dataset is timeseries based....
user avatar
0 votes
0 answers
19 views

Applying a rolling t.test on a single variable

I have a dataframe which looks like this: ...
user avatar
1 vote
1 answer
53 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 ...
user avatar
  • 23
0 votes
0 answers
46 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 ...
user avatar
0 votes
0 answers
8 views

Different Time Series CVs?

I'm writing a synthetic control algorithm which uses rolling-origin cross validation. Upon reading my paper, others have suggested I use "forward cv" and another paper I read seems to refer ...
user avatar
4 votes
0 answers
149 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 ...
user avatar
  • 67
1 vote
0 answers
26 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 (...
user avatar
  • 67
0 votes
0 answers
139 views

tscv and using forecasted expalanatory variable for 7-step ahead forecasts

Suppose I am forecasting oil consumption (y), using air temperature (x) as explanatory variable based on a rolling window process. I want to use actual temperature for training period and forecasted ...
user avatar
  • 7
0 votes
0 answers
14 views

Rolling 24-hr time series data - how to back out minute level data?

I have data (trading volume) that is tracked on a rolling 24-hour basis approximately 1 minute or so. Here are some sample timestamps that highlight why I say approximately: I am trying to use this ...
user avatar
1 vote
1 answer
57 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 ...
user avatar
  • 59
0 votes
0 answers
14 views

How to optimally select window sizes for filters on spectral data

I am trying to find an efficient method of selecting a window size for a Savitzky-Golay filter. The applications is mainly to find an smooth representation of a spectra containing sharp peaks in noisy ...
user avatar
0 votes
0 answers
14 views

Sample Period for Model Selection?

I am currently trying to perform pseudo-out-of-sample forecasting for monthly exchange rates with a 10-year rolling window. Before that, I select an autoregressive model using Box Jenkins ...
user avatar
0 votes
0 answers
25 views

How to make multivariate windowed time series data work for LSTM?

My dataset comprises 4-timestep sliding windows for multiple features and is structured as shown in the first image below. It is important to note that rows can be either (i) the next sliding window ...
user avatar
0 votes
1 answer
61 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: ...
user avatar
  • 7
0 votes
0 answers
22 views

Calculate number of "rolls" for a rolling panel regression

Time series rolling regressions have never tripped me up in the past, but setting up a panel rolling regression remains very nebulous to me. Assuming that I have not transgressed against the Gauss-...
user avatar
0 votes
0 answers
46 views

Estimating rolling regression slope with penalty

I'm trying to solve the following problem. I have two time series of $X$ and $Y$ of horizon $T$, and I am interested in obtaining a rolling estimate for $m$ a regression of $Y=mX+c$. I also want to ...
user avatar
1 vote
0 answers
81 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 ...
user avatar
  • 1,104
0 votes
0 answers
23 views

Question on Adfuller test results variation

I have a series on which I am trying to run linear regressions and determine the stationarity. The test for stationarity changes from being stationary to non-stationary when I move the window to the ...
user avatar
  • 1
2 votes
1 answer
930 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 ...
user avatar
  • 203
1 vote
0 answers
37 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 ...
user avatar
2 votes
2 answers
258 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 ...
user avatar
  • 143
0 votes
1 answer
102 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 ...
user avatar
  • 5
2 votes
2 answers
869 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-...
user avatar
  • 252
2 votes
1 answer
104 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 ...
user avatar
  • 139
1 vote
1 answer
63 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 ...
user avatar
2 votes
1 answer
354 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 ...
user avatar
0 votes
0 answers
33 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 ...
user avatar
  • 101
2 votes
0 answers
48 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 ...
user avatar
  • 139
0 votes
1 answer
51 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 ...
user avatar
  • 89
0 votes
1 answer
229 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 ...
user avatar
  • 1
1 vote
0 answers
59 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 ...
user avatar
  • 11
0 votes
0 answers
34 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., ...
user avatar
  • 592
3 votes
1 answer
1k 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 ...
user avatar
  • 80
1 vote
2 answers
222 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 ...
user avatar
  • 80
3 votes
1 answer
478 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$, ...
user avatar
1 vote
1 answer
393 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 ...
user avatar
1 vote
0 answers
55 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 ...
user avatar
3 votes
1 answer
381 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 ...
user avatar
  • 131
2 votes
1 answer
155 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 ...
user avatar
  • 73
2 votes
1 answer
25 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 ...
user avatar
  • 165
1 vote
1 answer
3k 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 ...
user avatar
0 votes
1 answer
266 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 ...
user avatar
  • 1,019
1 vote
0 answers
281 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 ...
user avatar
  • 135
2 votes
1 answer
337 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 ...
user avatar
1 vote
0 answers
591 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 ...
user avatar
  • 11
0 votes
1 answer
4k 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 ...
user avatar
1 vote
0 answers
46 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 ...
user avatar
  • 11
1 vote
0 answers
91 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 ...
user avatar
  • 131