Any efficient way to write the following loop? dataPLprocessed is a time-series data and I want to calculate the score based on rolling 7 days percentile value (see the loop bel