The manual page on Trading Strategies http://zorro-trader.com/manual/en/strategy.htm says "Another effect - a real inefficiency that can be exploited in strategies - is visible in the following spectral analysis chart:" and goes on to say "Cycles arise from synchronized trading behavior and are not necessarily aligned to days or weeks. Those cycles are not found in random data."
The spectral analysis chart presented in that section is compelling at first glance. There are several well-defined peaks implying some inefficiency at certain cycles. But Spectral analysis of a random-walk timeseries also results in a set of well-formed peaks. This one, for example, has a nice juicy peak to draw your attention to a cycle of ~= 80 hours. The AVG amplitude (39) is nearly as high as the one discussed in the manual (41 @24hrs), and higher than all the others mentioned. An even more significant peak (42) sits at 146 hrs. Of course, this is all meaningless since the series behind it was generated by the Random.c script.
Can you identify anything different about the attached graph compared to the one in the manual? In general, what supports the assertion that the cycles on display in the chart do not appear in random data?
Re: Verifying "Those cycles are not found in random data."
[Re: GPEngine]
#449052 03/02/1514:5603/02/1514:56
Very good question. Spectral peaks also appear in random data when not enough samples are used. This is the case here, so the statement in the manual is not sound. The spectrum function here uses only about 500 samples, and thus is not really suited for proving that a spectral inefficiency exists. It is only for finding the peaks of the current snapshot of a spectrum, under the assumption that those peaks already do exist.
This is due to the nonstationarity of price data. We should look deeper into this and provide a function that samples a larger amount of data for the spectrum, so that it's still quasistationary, but can be distirguished from random data.
Re: Verifying "Those cycles are not found in random data."
[Re: jcl]
#449068 03/03/1504:0103/03/1504:01
Z1 and Z2 are relatively simple trend and counter trend systems similar to those in the tutorial. They have nothing to do with the chart or the spectrum function.
Re: Verifying "Those cycles are not found in random data."
[Re: jcl]
#449329 03/15/1511:0003/15/1511:00
Very good question. Spectral peaks also appear in random data when not enough samples are used. This is the case here, so the statement in the manual is not sound. The spectrum function here uses only about 500 samples, and thus is not really suited for proving that a spectral inefficiency exists. It is only for finding the peaks of the current snapshot of a spectrum, under the assumption that those peaks already do exist.
This is due to the nonstationarity of price data. We should look deeper into this and provide a function that samples a larger amount of data for the spectrum, so that it's still quasistationary, but can be distirguished from random data.
The spectrum function has a parameter for setting the data amount. That was already implemented some time ago.
Aside from that: The mere existence of peaks in a spectrum is indeed no proof of cycles in the price curve, since short-lived cycles are in fact found in random data when you look only at a short period. It's the same for almost all inefficiencies. A single 1-week trend, mean reversion, or cycle can be real or just random. For determining a real inefficiency, you must look at a long period of price data and check if the anomalies occur more often than in random data.