In the above image I have created a time series (in cyan) that is a simple addition of a major cycle (in green), a minor cycle (in cyan) and a linear trend (not shown separately). What I would like to do is filter this time series to remove the minor cycle so what is left would be the trend plus major cycle (in red). In practice no information would be available about the minor cycle, although the period of the major cycle would be known from applying code for the Hilbert transform.
One way in which I might do this is:
- apply a bandpass filter set to the major cycle period, on the original data
- subtract this bandpass from the original series
- apply the Hilbert transform to the remainder to get period of minor cycle
- apply another bandpass filter set to this minor cycle period, on the original data
- subtract this second, minor cycle bandpass from the original data
- and hopefully end up with the desired red output
First off, would this be a valid approach, and secondly is there another way in which I could filter out the minor trend?