Typical shape detection algorithms Here is my target, given a set of consecutive discrete 1-d data points within a window. I want to know whether there are good algorithms to detect certain typical shapes of the signal in the window. Including:


A positive step
A negative step
An upward line
A downward line
A hill shape
A bowl shape


The size of the given window could be of any length. And the data is from financial markets so it could be highly random. I wonder if there are good methods to detect whether the above typical shapes exist in the window, which could of course be given by a probability for each shape. I don't need very concrete descriptions of each algorithm, just need to get a direction for my further research.
Do you know Calculus?

All those shapes correspond to bounded values over an interval of the function or its first and second derivatives.

There are many ways to approximate derivatives in discrete sequences.

You can design a metric for each of your conditions based on the derivatives, then evaluate those metrics on a sliding basis.

1) A step occurs when the first derivative is relatively close to zero, then has a spike, then returns to zero.

2) Same as 1, opposite sign.

3) An upward line exists when the first derivative is bound near a positive value and the second derivative is bound near zero.

4) Same as 3, opposite sign

5) A hill (approximated by a parabola) occurs when the second derivative is bound near a negative value.

6) Same as 5, opposite sign