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
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!
0 Response to Rolling percentiles for large dataset
Post a Comment