Thursday 31 March 2011

AFIRMA trend line

I recently came across a blog post here that talks about an Autoregressive Finite Impulse Response MA, with a link to Metatrader 4 code here. Whilst the blogger in question dismisses the AFIRMA as being "completely useless" I think that in fact this could be quite useful for me. I can guess that s/he dismisses it due to the fact that the windowing function "peeks into the future" (10 days in the case of the default setting of 21).

However, using the leading functions I have talked about in my recent posts, I believe it might be possible to use the values of these leading functions as a proxy for this "peek into the future." Essentially the idea is to take the current bar's 1 bar leading function value of the Cybercycle as a proxy for the next bar's actual Cybercycle value, and then add this to the current bar's Instantaneous trend line value plus its 1 bar momentum to arrive at a "best guess" for the next bar's estimated value. Then all calculations for the indicators are re-run using this estimated value, a new 1 bar leading function calculated, added etc. and wash, rinse and repeat as required.

I can envisage that the coding of this will be difficult and time consuming, so before attempting to do so I will conduct some basic tests of the AFIRMA as is, with the luxury of this perfect "peek into the future" on historical data. I will have to be satisfied that the AFIRMA is possibly worth using before I put time and effort in to this coding task.

No comments: