I need to find the window of increasing trend and decreasing trend in a time series data. For example in the below plot, it has 3 increasing trend and 2 decreasing trend. I need identify the windows having this trend.
I tried using 'smoothed z-score algorithm' provided in Peak signal detection in realtime timeseries data. But am not getting the expected result.
Here increasing/decreasing trend may continue from 1sec to 1 minute. Also the height of peak may varies from 20 to 200.
Difference between current peak with next peak will not work here, since there will be minor fluctuations in the data.
Please suggest some idea here to use adaptive algorithm to detect the trend and its duration