Would like to see these cycles charted against the SP500 in real time while I trade my stocks ---- what do you use for this as I know of several economists that use cycles and are very well known....they say there is still one more downturn before the up....
I check out dshort's page for bear rally comparison....
I am not an economist by any measure but only someone that likes to play around with historical data in trying to forecast market action. I do not have any real time capablitity at this time. Updating the data manually every minute is about as close as I can get to 'real time' at this point. If this project moves forward as expected then adding real time capability would be next major task on the list.
the amount of historical data used to project these cycles depends on the test period. You can have too few or too many data points that it can skew your results. Part of the process in projecting cycles is to find the optimum data range for each time period you are working with. I hope that answers your question.
p.s. by the way, I have seen Astracyclical projections which can get very interesting....LOL!
Last edited by NMTrader; August 9th, 2009 at 07:11 PM.
Reason: added p.s.
The following user says Thank You to NMTrader for this post:
sefstrat thank you for sharing. i imported the d9GoertzelDFT.cs into ninja tried to plot it on a chart but it did freeze ninja a couple of times and no plots showing please advise if doing something wrong
Yes that is one problem with Goertzel algorithm, it needs large window period and is thus computationally expensive (results are inaccurate with small window)
There is likely a more efficient way to compute it, I just converted that one from MT4 so it is done the way the original author did it. One other thing to note is that all the values are plotted on one plot, but they may have very different scales (ie some may look like a flat line because the other plots have much larger numbers).
Neither of the indicators I posted are complete 'ready to use' solutions exactly, but with a little work you can build something nice out of them =)
The wavelet transforms can be computationally expensive too depending on your choice of basis function and level of decomposition. The file I posted here is an older version of the one I currently use, one thing I changed in the newer version is that it calls an unmanaged library for the linear algebra calculations which uses Intel MKL (highly optimized multithreaded math library). That made it *much* faster than the version posted here, both due to the threading and the fact that it takes the memory burden off of NinjaTrader since I no longer store the values in DataSeries.
Intel MKL is proprietary and somewhat expensive but you could do the same thing using the open source LAPACK library. The version posted here works fine though as long as you only use simpler basis functions such as Haar or D4 and don't do too many levels of decomposition (5 is plenty usually).
If you are interested in using wavelets I'd recommend the books 'Ripples in Mathematics' and also the book about Wavelet applications in Finance by Gencay. The MATLAB wavelet toolbox is very useful for playing around with wavelet transforms also, it includes many example files showing how they can be used for different purposes.
The following 4 users say Thank You to sefstrat for this post: