Objective: Working with time series of historical price data that is liable to have outliers and wish to apply a defined procedure to identify the outliers.
Procedure: Take time series and apply Tukey median based smoothers, so this splits data into two parts a smooth part and a residue part. Take the residue part and calculate an outer threshold (fence) that is like the Tukey Outlier rule based on IQR, but instead use the IDR (Interdecile range) so upper outlier is greater than 90 percentile + M * IDR and lower outlier is less than 10 percentile - M * IDR. I am doing this using different resolutions of smoothers and wish to apply one that is very localised so use a simple median of 3.
Problem: For localised smoother using median of 3 a lot of data points the smooth are the same as the original data and therefore the residue is very frequently exactly zero. In fact the amount of zero residues is approximately 50% of the data points. So using IQR rule it would not work well as IQR is often zero or near zero with so many residuals being zero.
Choice/Question: Given that there are a lot of zero residuals I am asking if it is valid to exclude the zero residuals and just calculate the order statistics and the subsequent outlier threshold to be just on the data that excludes the zeros.
What would be Optimal: Rules make sense to other people when explain them and if slightly different smoother is applied e.g. median of 5 then multipliers to create thresholds can be set to be similar/the same.