Hi,

I have a large dataset containing more than 30m observations.
The dataset aggregates daily trading data for about 35000 individuals (variables "date" and "ind").
I need to compute a rolling 1-, 5-, 95-, and 99-percentile of a certain variable X for each of those individuals.
So, something like

Code:
xtset ind date
mvsumm X, stat(p1) win(60) gen(p1)  end
would do the job over a 60-day window. However, this command is relatively slow. It runs for more than a day. Since I need this multiple times, I am in need of a quicker option.
Is there any other, faster way to do this?
My impression is that rangestat is faster.
Unfortunately, there seems to be no option to compute percentiles with rangestat.

Thanks for any input!