That's why de-trending and windowing must be applied before doing FFT. Best regards, Tomasz Janeczko amibroker.com ----- Original Message ----- From: "Fred" <[EMAIL PROTECTED]> To: <[email protected]> Sent: Wednesday, October 11, 2006 5:33 AM Subject: [amibroker] Re: Hurst Channels Code
> As I recall Hurst didn't make much more mention of it in the course > material then in PM ... However for those wanting to understand his > methodologies the course is the definitive work which goes well > beyond CMA's & DE's ... DE's can be an interesting tool for trading > at the extremes ... I'll post a version later that uses PolyFit for > extrapolation and has a variety of flexibility to it not present in > the AFL that's kicking around at the moment. My personal preference > is for Trig Fits as opposed to a polynomial Fit, but when properly > damped the PolyFits work ok too. > > IMHO the periodogram is nothing more then a product of an FFT like > algorithm i.e. an investigative tool for determining cyclic > forces ... There are a variety of methodologies and tools out there > to produce one and from what I understand at least one will be built > into AB on the next release. Personally I have several problems with > FFT's ... which can be demonstrated with a wave generator ... > > For example the code below ( It's a VBS out take ... Not complete, > but usable with minor mods ) will generate a composite wave > consisting of several cosines of various user selected wave lengths, > amplitudes & phase offsets ... it can also add a trend to the > composite as well as random noise to almost any level ... It is IMHO > very instructive to use stuff like this and see how they affect > different DSP algorithms. > > FFT's have a tendancy to be easily fooled by trend and even more so > by a combination of trend and noise. This leads one to surmise that > it is probably a good idea to at least remove the trend from data > before tossing it to an FFT for analysis. The other problems that > FFT's have center around their inability to have relatively good > resolution at low frequency. The reason of course is related to how > the algorithm itself works. This sort of forces one to use long data > histories relative to the cycle lengths being investigated so that > the result is decent resolution. The problem with this approach is > that IMHO wave lengths either change or if you are a purist some > times are overwhelmed by non cyclic activity i.e. 10/87 etc ... Since > FFT's in essence provide data related to cycle length, amplitude and > phase offset FROM THE BEGINNING OF THE DATA, the shorter wave > lengths, which are also typically buried in noise, don't extrapolate > correctly. So while FFT's can definitely provide some insigth into > the cyclic forces they are not a be all and end all. > > pi = 4 * atn(1) > > Randomize > > StartX = (dFactor + 1) * 1000 > > for i = 1 To nIS + nCoeff > > Trend(i) = (i - 1) * rTrend * dFactor * (rCyc1Amp + rCyc2Amp > + rCyc3Amp + rCyc4Amp + rCyc5Amp) / 5 > Noise(i) = (Rnd - 0.5) * 2 * rNoise * dFactor * (rCyc1Amp + > rCyc2Amp + rCyc3Amp + rCyc4Amp + rCyc5Amp) / 5 > > Cycle1(i) = cos(((i - 1) / rCyc1Len + rCyc1Phase / 360) * 2 * > pi) * (rCyc1Amp * dFactor) + Trend(i) * 0.2 > Cycle2(i) = cos(((i - 1) / rCyc2Len + rCyc2Phase / 360) * 2 * > pi) * (rCyc2Amp * dFactor) + Trend(i) * 0.2 > Cycle3(i) = cos(((i - 1) / rCyc3Len + rCyc3Phase / 360) * 2 * > pi) * (rCyc3Amp * dFactor) + Trend(i) * 0.2 > Cycle4(i) = cos(((i - 1) / rCyc4Len + rCyc4Phase / 360) * 2 * > pi) * (rCyc4Amp * dFactor) + Trend(i) * 0.2 > Cycle5(i) = cos(((i - 1) / rCyc5Len + rCyc5Phase / 360) * 2 * > pi) * (rCyc5Amp * dFactor) + Trend(i) * 0.2 > > CycleX(i) = Cycle1(i) + Cycle2(i) + Cycle3(i) + Cycle4(i) + > Cycle5(i) + Noise(i) > > ISData(i) = StartX + CycleX(i) > > Next > > > --- In [email protected], "wavemechanic" <[EMAIL PROTECTED]> wrote: >> >> Fred: >> >> Did you go through the course > (http://www.traderspress.org/detail.asp?product_id=1400)? Do you > understand how the Periodogram is calculated? That's one of the big > blanks in my understanding of the Hurst world. Based on the > TraderPress summary that seems to be covered in the course. >> >> Bill >> >> >> ----- Original Message ----- >> From: "Fred" <[EMAIL PROTECTED]> >> To: <[email protected]> >> Sent: Tuesday, October 10, 2006 9:23 AM >> Subject: [amibroker] Re: Hurst Channels Code >> >> >> > Most of us who have read Hurst's writtings are well aware of the >> > general principles involved in PM ... However, there are several >> > points that should be mentioned or questioned with regards to > your >> > comments ... >> > >> > 1. It is clear from Hurst's course material that PM and the >> > techniques therein were, in his mind, a fairly simplistic view of > how >> > he analyzed price and that the curvelinear trendlines were only a >> > means for the analyst to discover the cyclic forces in play i.e. > a >> > possible first step in developing a full phasing Analysis ( FPA ) > and >> > using FLD's, VTL's and other techniques ... >> > 2. As far as the tools and the math involved in the later > chapters >> > and appendicies it is also clear that Hurst not only employed the >> > techniques therein but other more sophisticated techniques that > he >> > didn't really write much about in PM. Clues to this can be seen > in >> > the bibliography. >> > 3. While PC's and AB didn't exist in 1970, mainframes and mini's > did >> > and if you recall we had already managed to get to the moon and > back >> > mostly by use of the slide rule. >> > 4. The curvelinear bands that Hurst's uses are in essence n > period >> > centered moving averages with percentage or standard deviation > bands >> > around them which by their nature can not be computed closer than > n / >> > 2 bars prior to the current bar. As such one must have some >> > technique for extrapolating those bands to at least the current > bar >> > and preferably beyond. Without this capability one would have >> > already experienced half the move in the opposite direction when > the >> > CMA catches up. >> > >> > My question then is ... If you are using curvelinear bands of one >> > sort or another inside AB how are you constructing the bands and > what >> > methodologies are you using to extrapolate them ? >> > >> > --- In [email protected], "Ton Sieverding" >> > <ton.sieverding@> wrote: >> >> >> >> Hurst wrote 'The Profit Magic of Stock Transaction Timing' in > 1970. >> > When the technical annalist was using pencil and paper for his >> > graphs. Bill Gates and TJ still did not exist and Hurst was not > using >> > a PC. I've tried to get the original version of the book but only > got >> > the reprinted version from 2000. Frankly I have the feeling that >> > Chapter 11 as well as the Appendices have been added at the time > of >> > the reprint. This to give you my opinion how I see the book. It > is an >> > attempt to work with forecasted envelopes. And a good one ... >> >> >> >> For me the practical 'red line' for using the Hurst principle is > as >> > I told you already rather simple. Try to construct two trading > bands. >> > A long and a short period trading band. Hurst tells you how to do >> > that with pencil and paper. The software today does it > automatically >> > for you. As soon as the short band is above the long one and the >> > price above the short band you will have an 'overbought' > situation. >> > When the short band falls below the long band and the price is > below >> > the short band you have an 'oversold' situation. The combination > of >> > these 'overbought' and 'oversold' situations with a falling resp. >> > rising long trend will give you the SELL and BUY signals. I am > using >> > Hurst with weekly views and indexes and must say that the results > are >> > very good ... >> >> >> >> Ton. >> >> >> >> ----- Original Message ----- >> >> From: Rakesh Sahgal >> >> To: [email protected] >> >> Sent: Monday, October 09, 2006 3:18 PM >> >> Subject: Re: [amibroker] Hurst Channels Code >> >> >> >> >> >> I suggest you get familiar with the concept of cycles a la > Hurst >> > and >> >> use of Curvilinear Bands before you try to comprehend the > code. As >> >> for the code looking into the future - yes it does. >> >> >> >> R >> >> >> >> On 10/9/06, Saji Oommen <sajioommen2@> wrote: >> >> > Hello, >> >> > >> >> > Thanks for sharing the code. Could you kindly confirm >> >> > that does this code have any ZIG function in it or >> >> > does it look into future or the signals change when >> >> > new data comes in. I read through the code and could >> >> > not make it out. I am in the learning process of AFL. >> >> > So pardon my ignorance. >> >> > >> >> > Regards >> >> > >> >> > Saji >> >> > >> >> > --- Ton Sieverding <ton.sieverding@> wrote: >> >> > >> >> > > The way I see it is rather simple. Let's take the >> >> > > S&P500. Using a weekly view : >> >> > > a.. Buy when Blue+Red+Price BELOW Green and Green >> >> > > rising channel >> >> > > b.. Sell when Blue+Red+Price ABOVE Green and Green >> >> > > falling channel >> >> > > Sell Augustus 2000, >> >> > > Buy March 2003, >> >> > > ... still Long. >> >> > > >> >> > > Ton. >> >> > > >> >> > > ----- Original Message ----- >> >> > > From: Rakesh Sahgal >> >> > > To: Amibroker Yahoogroup >> >> > > Sent: Monday, October 09, 2006 10:57 AM >> >> > > Subject: [amibroker] Hurst Channels Code >> >> > > >> >> > > >> >> > > For any of those interested in tinkering with >> >> > > Hurst Channels, am >> >> > > attaching code I had recieved from group member >> >> > > Jason Hart. This code >> >> > > was written by group member going by the nickname >> >> > > "Ace". >> >> > > >> >> > > I was not able to make much use of it. The reason >> >> > > was - the values of >> >> > > the channels, current and in the immediate past >> >> > > i.e. the projection >> >> > > zone, were not constant. Since the values of the >> >> > > projections changed >> >> > > everyday I had no way of making any meaningful use >> >> > > of it ( I was >> >> > > basically looking for what Hurst called "Edge >> >> > > Band" Trades). If my >> >> > > understanding was incorrect and anyone can make >> >> > > sense of them, please >> >> > > be kind enough to share your insights with the >> >> > > rest of us. >> >> > > >> >> > > Rakesh >> >> > > >> >> > > >> >> > > >> >> > > >> >> > >> >> > >> >> > __________________________________________________ >> >> > Do You Yahoo!? >> >> > Tired of spam? Yahoo! Mail has the best spam protection > around >> >> > http://mail.yahoo.com >> >> > >> >> > >> >> > Please note that this group is for discussion between users >> > only. >> >> > >> >> > To get support from AmiBroker please send an e-mail directly > to >> >> > SUPPORT {at} amibroker.com >> >> > >> >> > For other support material please check also: >> >> > http://www.amibroker.com/support.html >> >> > >> >> > >> >> > Yahoo! Groups Links >> >> > >> >> > >> >> > >> >> > >> >> > >> >> > >> >> > >> >> > >> >> > >> >> > >> >> >> > >> > >> > >> > >> > >> > >> > Please note that this group is for discussion between users only. >> > >> > To get support from AmiBroker please send an e-mail directly to >> > SUPPORT {at} amibroker.com >> > >> > For other support material please check also: >> > http://www.amibroker.com/support.html >> > >> > >> > Yahoo! Groups Links >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > -- >> > No virus found in this incoming message. >> > Checked by AVG Free Edition. >> > Version: 7.1.407 / Virus Database: 268.13.1/466 - Release Date: > 10/7/2006 >> > >> > >> > > > > > > > Please note that this group is for discussion between users only. > > To get support from AmiBroker please send an e-mail directly to > SUPPORT {at} amibroker.com > > For other support material please check also: > http://www.amibroker.com/support.html > > > Yahoo! Groups Links > > > > > > > > > > Please note that this group is for discussion between users only. To get support from AmiBroker please send an e-mail directly to SUPPORT {at} amibroker.com For other support material please check also: http://www.amibroker.com/support.html Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/amibroker/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/amibroker/join (Yahoo! ID required) <*> To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
