Hello ! 1- Yes, I agree MEM dominant cycle (elhers) and MEM classic don't give same result for main cycle. But elhers for dominant cycle use Homondym (something like that... i don't remember me well : ) ) discriminator. So it seems to be different. It doens't use modeled data... but extract directly dominant cycle. Dominant cycle can be used for every bar, but yes MEM with AR modeling is more computer intensive, you are right ! I am working on code it in DLL, seems 2 or 3 times faster than AFL, not so much. For back testing it should take long time. But for computing it only for one bar (i.e: trading on bar close for exmple) it is ok i think (maybe 1/10 sec to compute forecast...).
And problem for data length = n * yesterdays cycle, is that yesterday cycle depend from data length yesterday too... so it is recursive and the problem is always here. Maybe compute the length = one dominant cycle from elher ? (but dominante cycle need peridos parameter too ?). I think practical way is maybe to know how long we keep each trade line in our account. For exemple for intraday trading if we keep position around 50 min in average, so if chart is 5 min bar, we should at least use 10 datas. Maybe no more so that way we only are interesting in cycle which have impact on our trading time horizon of 50 min. -> For d(S(f))/df it is already in the AFL i posted to extract dominant cycles. It keep only the cycles which have more power than the noise (i take the noise variance as refence to compute the spectrum in decibels). After i use RegLinSlope to find when it is zero so it is a maximum like you suggest it. This way there is often between 1 and 6 cycles. Fred, you said were saying you find around same number of dominant cycle too in one of your previous mail if i remember well... This way is A LOT MORE POWERFULL than just elhers dominant cycle. Just try 3 theorical added sinus... dominant cycle is lost... but by taking the 1 to 6 six dominant cycle from AR spectrum you find back the 3 main frequency without any pbl. 2- Good links thanks. I have to read a little about it... 3- For downsampling, i didn't tryed for now. But i want to experiment non linear (teking volatility and volume like i explained it before). I will post about it after i done it, but for now many work. Cheers, Mich. ----- Original Message ----- From: Paul Ho To: [email protected] Sent: Wednesday, November 22, 2006 1:25 PM Subject: RE: [amibroker-ts] FW: Sample Data Range, Sampling Rate, and Window Effect on Au Mich, I guess my last post really discuss two separate but somehow related issues 1. How to programmatically determine the data length used for MEM a. John Elhers discussed in his book Mesa and Trading Market cycles p.88 what he used to determine data length. In the beginning he maximised the SNR to establish to optimum data length. Later on he set todays data length to yesterday cycle length, assuming that it requires one cycles worth of data to make a good measurement. Mich, you have said in your previous post that perhaps ½ cycle will suffice according to your experience. We of course can set today data length = n * yesterdays cycle period; There is also a practical problem in calculating dominant cycles. It is computing intensive for every bar. I wonder if it can be calculated more directly, for example using d(S(f))/df = 0. any views. b. When compared the dominant cycle plot using MEM and that using Elhers formula , the result are quite different. MEM doesnt always produced a dominant cycle for every bar. 2. How to deal with non-stationary signals a) My knowledge about Hilbert is fairly limited (left University more than a quarter of a century ago) is mainly from reading Elhers Rocket Science for traders. (pg 65) it is only about 10 pages I am willing to photocopy it send it to if its relevant. Another site Ive reading is http://wwwhitech.technion.ac.il/~feldman/intro.html and http://lucid.igpp.ucla.edu/lessons/ess265/2005/hilbert_huang_transformation. pdf which provides some sort of introduction. EMD may be interesting. 3. The effect of downsampling on Spectral density a) It seems that down sampling often provides interesting result and clearer spectral peaks which are otherwise masked. Have you tried it 3. Ill have a look at your suggestions later on. Have you used any of it so far. Cheers Paul. _________________________________________________________________ Live.com: le nouveau moteur de recherche par Messenger! http://www.windowslive.fr/livecom/
