How to determine if there is a peak in the data I have a list of merchants and their weekly sales. I need to filter out those who've had a peak in the sales in the last week. I have 5 weeks of data for each merchant and I can get data for more weeks if needed. What statistical measure can I use to get merchants who've had a spike in sales in the latest week? Is Kurtosis useful for something like this?
Also, how can I implement this in either excel or R?
 A: The findpeaks function of the quantmod package of R can be used to find peaks by adjusting your threshold argument.
What is the threshold argument?
A peak for me might not be a peak for you. So, the threshold argument should be set accordingly, depending on the data, problem statement and the intuition.
A: A peak that is a value that exceeds expectations can be easily found by identifying a hybrid model containing evidented deterministic and stochastic structure ( an ARMAX model ).
There is no need to set an arbitrary value as the estimated probability of observing what  was observed before it was observed is available via a test of significance using Intervention Detection http://docplayer.net/12080848-Outliers-level-shifts-and-variance-changes-in-time-series.html .
If you present actual data , I will try and help further by example.
A: Outlier detection can be an alternative.
A one-class SVM would give you the list of points that can be considered "anomalies", given the overall distribution of the data.
Other simpler methods are based on the quantiles of the distribution or multiples of the median absolute deviation (MAD).
If you instead want to detect a "peak" in a curve, in general, there are a gazillion way of doing it.
One simple method (but not very robust) is finding the points where the first derivative changes its sign. Then you can work with small windows around that point and estimate the second derivative to find the base points of the peak (maximum curvature).
