Originally Posted By: boatman
It isn't difficult to show that some cycles present in financial time series persist for long enough and with a large enough amplitude to both detect and trade them.

Zorro provides a way to analyze spectrum. Let's see if it is able to surface anything of this sort.

Arbitrarily using EURUSD 60m bars and the Spectrum script in range 20080101 - 20150201. The strongest period in [5, 400] is 372, corresponding to a half-month. The hypothesis is, this pattern persists throughout the backtest period.

If you take 5000-bar slices of the time period and run Spectrum on each one independently, you see that the reason for the strong peak over the whole period is due to the contributions of 2 very strong (65-75) peaks within the period, around Dec 2009 and again around July 2014. That's it. The cycle isn't even strongly present (>40) more than half of the time. The peaks have different widths and appear to come and go as they please. The amplitude sometimes falls far below what is represented in the whole-period spectrum. For example, if you had a strategy that depended on cycle 372 and you kept it running through Nov 2010, you would have had a very bad time.

So the whole-period spectrum graph misses some important depth. Perhaps Zorro's Spectrum script should add error-bars to it to make the uncertainty clearer? Another option is to plot the median amplitude instead of the avg. Well, I'll leave that up to jcl.

In any case, the cycles are not consistently present even in the case of well-defined peaks in the Spectrum graph. The question becomes how to detect when the cycles are present. boatman, if you have more thoughts you'd be willing to share, can you start a new thread about that?