Hi, I have been programming some eas with lowpass that catch for instance trends of 2 month length or 1 month length. But I found that strategies that succeed in backtests for instance in 2009-2014 fail miserably in 2002-2008. Is there a way to adapt the moving average period to the market conditions? Thanks!
You could do that through periodic optimizations ... this is essentially what a walk-forward (optimizer) does.
Thanks for your reply dom. I use walk forward optimization and plan to retrain from time to time but market conditions can vary more than the parameter range established for the optimizer. There has to be some parameterless indicator of market conditions, maybe volatility but it is derived from a timeperiod and again the problem of what timeperiod to use to derive volatility. Maybe to know what timeperiod the autocorrelation of the prices series can prove useful? (ie when autocorrelation is less than 0.10 for instance then that is the timeperiod)
Not sure if this is what you are looking for, but Google MESA and John Ehlers. I know some people have written code to run this concept, saw it on one of the forums. http://www.aspenres.com/documents/help/userguide/help/mesahelp/mesa1using_mesa_by_john_ehlers.html This is just a sample, there is a lot more out there.
John Ehlers is the man for using DSP methods on market data. Lots of his work is available for free if you search. Look at his work on finding the dominant cycle, and using that to tune your indicators. Just don't expect John's work or TA in general to make you into an instant bazillionaire. I tend be coming around to the realization that the market is too close to a random walk process for TA to really work consistently. Although I am currently interested in the bandpass filter to locate cycles.
I did a lot of R&D in 2009 on the Ehler's Hilbert-Transform based dominant cycle stuff ... I didn't capture properly all of my findings back then, so this is only a partial (and may-be incorrect) view: - The Hilbert-Transform coeffs are possibly wrong ... doing a lot of search in Maths papers, I found 2 distinct set of formulas, upon close inspection I convinced myself the one used by Ehler was the wrong one. - The detrending based on 1st order derivative is bad: the basic premise of the Homodyne algo is that the signal is a sinusoid, so when it is not (eg, a triangle) the stability of the algo decreases rapidly as the period increases. So taking the 1st order derivative, we go from bad (eg. a triangle) to worse (a square). - The algo is limited in the cycle-lengths it can properly detect, from about 12 bars at the low end to about 40 bars at the upper end (these figures from my recollection of things) ... and of course, there is no embedded way to detect when the input signal goes out of those boundaries, leading to pure garbage output. In the end, I didn't find it useful for my own automated trading.
dom, have you looked at the Autocorrelation Periodogram method of locating the dominant cycle? He prefilters (roofing filter) to stay within the 10-40 cycle bounds. However, remember Ehlers work is all bullshit (if good intentioned) if the market is even close to a random walk process.
I do not know of, and seriously doubt the existence of, "some parameterless indicator of market conditions." Assuming you're only interested in recent market conditions, there is a cutoff length and that by definition is a parameter. Why parameterless at all? Given that you're using the adjective 'lowpass' as a noun, perhaps you're misinterpreting some other English words as well. Good luck in any event.
Yes I have already looked at the work of John Ehlers, in particular his approach of the market being in either cycle mode or trend mode, I have found the Sinewave indicator useful for trading cycles but I didn't find it useful his methods for trading trending markets, for instance MAMA.
Of course if the Efficient Market Hyphotesis is assumed, there's no point in trading forex. However it has been proved that there are market inefficiencies to be exploited