significance of PCA with EWMA I am evaluating a PCA on a set of 45 financial time series where EWMA (exponentially weighted moving averages) has been applied.
A small intro. An EWMA statistic has a form
$$
\hat{y}_t = \sum_s \lambda^s y(x_{t-s}) \big/\sum_s \lambda^s
$$
You can check here for more description.
First, I compute the EWMA mean and standard deviation, and I standardize the time series, which I will call $r_t$. The $\lambda$ I use is 0.95, and is obtained (as typically done) by minimizing the error
$$
\sum_i ((r^i_{t+1} - \mu^i_t(\lambda))^2 - \sigma_t^{i,2}(\lambda))^2
$$
After this I compute the covariance matrix of $\{r_t^i\}_i$, again using EWMA. Once I'm there, I want to compute a PCA, to understand a bit more what is going on. Now, I understand that the Marchenko-Pastur theorem is typically used to select the statistically significant eigenvalues. My question is, what is the number of data that we have to assume in the context of that theorem?
I would naively use $\lambda^{-1}$ (or some more sophisticated similar calculation) as the number of data points in each time series. The problem with that is that the limit of the distribution under the null hypothesis is 56.8, which is higher than the highest eigenvalue (this situation repeats at all times).
The obvious conclusion would be that those eigenvalues are not significant. However, if the correlation between the first eigenvectors at different times is quite high (say > 0.9). This would be an indication that they actually represent some long-term feature in the data. The alternative conclusion is that my estimation for the number of data in the time series is incorrect. But then, how much should it be?
 A: 
I would naively use $\lambda^{-1}$ (or some more sophisticated similar calculation) as the number of data points

With $\lambda^{-1} = 1/0.95 \approx 1.05$ you are using approximately 1.05 datapoints? That is extremely low.
If you compute $$\left(1+\sqrt{\frac{45}{1.05}} \right)^2 \approx 56.8$$ then you are extremely underestimating the number of datapoints.

You could determine a cut-off $\lambda$ by simulations.
Repeatedly generate $45$ columns with data. Perform the EWMA smoothening and then compute the correlation matrix and eigenvalues. Then see the distribution of those eigenvalues and whether the smoothening has a large effect on te effective number of datapoints.
Below is an example where we have 45 columns of 200 points and we changed the $\lambda$ variable
The red curve that we added follows the relation
$$\lambda_+ = \left(1 + \sqrt{\frac{m}{n(1-\lambda)}} \right)^2$$
So it seems like the moving average reduces the effective number of points approximately by a factor $1-\lambda$.

sim = function(n = 100, m = 45, q = 0.95) {
  ### generate data
  x = matrix(rnorm(m*n),n)
  y = x*0
  
  ### compute moving average
  filt = q^c(0:(n-1))
  for (i in 1:m) {
    for (j in 1:n) {
      y[j,i] = sum(filt[j:1]*x[1:j,i])/sum(filt[j:1])
    }
  }
  
  ### standardize
  mu = rep(1,n) %*% t(apply(y,2,mean))
  sig = rep(1,n) %*% t(apply(y,2,var)^0.5)
  y = (y - mu)/sig
  
  mu = rep(1,n) %*% t(apply(x,2,mean))
  sig = rep(1,n) %*% t(apply(x,2,var)^0.5)
  x = (x - mu)/sig
  
  ### compute eigenvalues
  
  ev_x = eigen(t(x) %*% x/n)
  ev_y = eigen(t(y) %*% y/n)
  
  return(list(x=max(ev_x$values),y = max(ev_y$values)))
}

set.seed(1)
m = 45
n = 200
q = seq(0,1,0.005)

values = sapply(q, FUN = function(qs) sim(n=n, q = qs))
boundary = (1+sqrt(m/n))^2

plot(c(0,1),boundary*c(1,1), type = "l", lty = 2,
     ylim = c(0,max(as.numeric(values))),
     xlab = expression(lambda),
     ylab = "sampled eigenvalue maximum")
points(q,as.numeric(values[2,]),
       pch = 21, col = 1, bg = 0, cex = 0.7)

lines(q, (1+sqrt( m/(n*(1-q)) ))^2, col = 2)

      

A: My naive solution was wrong. An "equivalent" number of rows $n*$ can be calculated as $$
\sum_{s\ge 0} \lambda^s = \frac1{1-\lambda}
$$
Using this, $n^*(\lambda=0.95)=20$, which is a more reasonable estimate. With it, the Marchenko-Pastur limit is 6.25, a result supported by simulations.
In general, the limit should be
$$
\lambda_+ = \left(1 + \sqrt{m(1-\lambda)}\right)^2
$$
