Q1 - How can I extract a template?
You will start by analyzing the time series on both datasets. You will need a statistical library for tests and comparisons.
If you can use Python, pandas is a good option.
R has an excellent forecast package. Start by running ets on both datasets.
Q2 - How can I quantify a trend since I will compare trends in two different places?
The idea of a quantitative trend is to start by looking for a (linear) trend line. All statistics packages can help with this. For example, if you accept a linear trend, then a line that minimizes the squared deviation from your data points.
A Wikipedia article on trend assessment is readily available. Also, keep in mind that a trend can be linear, exponential, or fading. Various trend parameters can try to take care of this.
Q3 - When can I say that the two trends are similar or not similar?
Launch ARIMA on both datasets. (The main idea here is to see if the same set of parameters (which make up the ARIMA model) can describe the time series of time series. If you run auto.arima() in forecast (R), then it will select the parameters p , d, q for your data, great convenience.
Another thought is to perform a 2-sample t-test of both series and check the p value for significance. (Caution: I'm not a statistic, so I'm not sure if there is any theory against this for time series.)
During the study, I came across the Granger Test - where the main idea is to see if one time series can help predict another, It seems very applicable to your case.
So these are just a few things to get you started. Hope this helps.
Ram narasimhan
source share