This question is a continuation of this one.
My goal is to find the turning points in stock price data.
So far I:
Tried differentiating the smoothed pri
You could take the second derivative into account, meaning you should additionally (to your first derivative) evaluate (y_{i-1} + y_{i+1} - 2y_i) / (dx)²
. If this is above a certain threshold you have a maximum, if it is below you have a minimum and else you can discard it. This should throw out a lot of points that you keep using your method of finding extrema (y' = 0
), because this condition is also valid for saddle points.