Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
Curve Calculation

The idea is to characterize recent curve shape (momentum) with numbers.
A positive curve value combined with positive Slope Calculation ought to mean a new local low (for now).
Not perfect. Maybe others can add to this. Lookback window plays a huge role. Comments in the code.
Positive value: Sort of bowl-shaped.
Negative value: Sort of hat-shaped.

2 responses

What you call "bowl-shaped" and "hat-shaped" is called "convex" and "concave", respectively. This is independent of the sign of the slope (first derivative).

Any sort of Proportional Plus Derivative calculation should do this for you. Lots of stuff on the Internet in the topic of Control Systems theory & applications, specifically PD or PID control systems. Easily applicable to trading systems / algos.