0
$\begingroup$

I want to create random time series that follow a given auto-correlation function. For this I am using an AR(n) model approach: $$X_t = \sum_{i=1}^n\alpha_i X_{t-i} + \epsilon_t$$ where $\epsilon$ is a random white noise of mean 0 and $\alpha$ are my model coefficients computed from a known covariance matrix. See for example: https://stats.stackexchange.com/a/29240/365730

But when I do that, I end up with random time series that do not have the desired auto-correlation. Compare the dark green curve (which represents the model) with the black curve (the targeted auto-correlation) on this figure, in which I fitted an AR(8) model:enter image description here

The auto-correlation is underestimated for lags lower than 8 (cf. left of the vertical dashed gray line) and for long lags it does not tend to 0 but to some negative value. The shorter my time series are, the more negative this correlation value is.

One possibility is that the sample correlation is biased, as reported for example here: Systematic negative bias in auto-correlations of random time-series and documented by Marriott and Pope (1954). In fact, only considering $\epsilon$, its auto-correlations for lag different than 0 is equal on average to $-1/(T-1)$, where $T$ is the length of the time series.

However, if I remove to $\epsilon$ its lag dependencies that I estimate from its auto-correlation function (i.e. $r=-1/(T-1)$), and compute the auto-correlation of the residual, I find a correlation values for lag different than 0 that are closer to 0. And using this residual for building the auto-correlated time series instead of the original $\epsilon$, I end up with an auto-correlation function closer to the desired one. By repeating the correction step on $\epsilon$ several times, I am even satisfied by the results: enter image description here

I am really confused by all this and I wonder whether it is appropriate to correct $\epsilon$ as I do. And if not, what would be your advises in order to create auto-correlated random time series that match correctly the targeted auto-correlation function?

Thank you!

$\endgroup$
3
  • $\begingroup$ Hi: The AR(x) autoocrrelations are fixed ( in terms of their formula but the formula is a function of the lag and the AR coefficients ) so it's not clear to me how you would necessarily match them with specific values. For example, take the AR(1) with coefficient $\rho$. The autocorrelation function is $\rho^{i}$ at each lag $i$. So, how you would match them with some given values ? I think that I don't understand what you're doing but hopefully someone else does. $\endgroup$
    – mlofton
    Commented Aug 18, 2022 at 0:02
  • $\begingroup$ Hi @mlofton, the coefficients of an AR(n) can be based on the auto-covariance matrix $\Sigma$ of an existing time series Y. By doing so, the created AR(n) time series would have the same auto-correlation function as Y for the n first lags by construction. For an AR(1) the $\alpha$ coefficient should indeed be equal to the auto-correlation at lag 1 of Y, but for higher order AR, the $\alpha$ coefficients are more complex. In practice, one needs to solve for $\alpha$ the following system: $\Sigma \alpha = C$, where $C$ is the auto-covariance of Y at lags spanning between 1 and n. $\endgroup$
    – yruprich
    Commented Aug 18, 2022 at 7:08
  • $\begingroup$ @yuprich: I'm pretty sure that what you're trying to do is not possible. At the same time, I may not be understanding what you're trying to do so I'll stay out of the rest of the discussion. Good luck and hopefully someone else can say something useful. $\endgroup$
    – mlofton
    Commented Aug 19, 2022 at 13:43

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.