title: Detect trends in time series
body: <p>I have a psql database with time series values for various stocks. I want to find, if the stock value increased by lets say 50% in last 45 days. I want to detect such sudden changes in the curve. Right now, my focus is on increasing values. Mostly quadratic curves, although it would be nice to find linear/logarithmic increases too.</p>
  
  <p>I will get to sudden drops later. Any pointers into how I detect such patterns in the curve? Is it possible to do it in sql? I am also open to learning any mathematical analysis tools or languages.</p>