1. ## "De-cycle" data

I need some suggestions of methods to look into for the following "problem":
Imagine I have a data series that has an obvious cyclical pattern. These cycles are part of larger movements (let's say they're short term trends in longer term trends, or just noise which has a cyclical pattern. What I want to do, is to take out the cyclical movement so I have the underlying trend left.

The data set can look like the following:

The identified cycles are:

After subtracting the identified cycles from the dataset, we're left with the underlying trend:

However, it's not as straight forward as this example. The example is made up from sinus curves just to illustrate. I'm able to identify the cycles well, but these aren't of the same scale as the dataset so I can simply subtract the cycles from the dataset. The cycles won't be as perfect as these ones as well, so I know I will just end up with an approximation.

I've tried methods such as HP, but the problem here is that they have to much weighting towards the last (most recent) data which means it doesn't consider the current cycle we have identified the data currenty show. Any suggestions how I can continue with this?

2. Seems like the third picture got lost:

3. Originally Posted by SysInv
I need some suggestions of methods to look into for the following "problem":
Imagine I have a data series that has an obvious cyclical pattern. These cycles are part of larger movements (let's say they're short term trends in longer term trends, or just noise which has a cyclical pattern. What I want to do, is to take out the cyclical movement so I have the underlying trend left.

The data set can look like the following:

The identified cycles are:

After subtracting the identified cycles from the dataset, we're left with the underlying trend:

However, it's not as straight forward as this example. The example is made up from sinus curves just to illustrate. I'm able to identify the cycles well, but these aren't of the same scale as the dataset so I can simply subtract the cycles from the dataset. The cycles won't be as perfect as these ones as well, so I know I will just end up with an approximation.

I've tried methods such as HP, but the problem here is that they have to much weighting towards the last (most recent) data which means it doesn't consider the current cycle we have identified the data currenty show. Any suggestions how I can continue with this?
If you can identify the period of what I will call the "seasonality" construct a moving average with averaging window length equal to the period of the seasonality.

CB

4. Thank you for your reply CaptainBlack. I tried a few different solutions with this, but i'm afraid I can't identify the average window length very accurately since my measures tell me 'where in the cycle' we currently are, but the cycle length/window length vary a lot.

Often the identified cycle position looks like:

Any other suggestions?

5. Originally Posted by SysInv
Thank you for your reply CaptainBlack. I tried a few different solutions with this, but i'm afraid I can't identify the average window length very accurately since my measures tell me 'where in the cycle' we currently are, but the cycle length/window length vary a lot.

Often the identified cycle position looks like:

Any other suggestions?
The cycle length is 32.

In fact by inspection you signal is a constant plus a 32 perios signa which itself tooks like a superposition of subharmonics. These will be pulled out nicely by an fft of a snippet a multiple of 32 samples long.

CB