PureBytes Links
Trading Reference Links
|
Since I didn't generate any interest in my previously-posted Persistency
of Trend Probability question, I have begun to try to tackle the problem
myself (scarey thought). I think that I have come up with what I need,
but since this is my first venture into formula-building, I would like
to ask for help reviewing and verifying the formula logic.
I am using Window on Wall Street, but the formula syntax is supposedly
the same as MetaStock's with the exception of the IF statements. The IF
statements in WOW do not use commas between the parts of the logical
expression, and allow "AND" or "OR" operators. I've separated the parts
of the one-line formula to, hopefully, make it easier to read.
CUMULATE
(IF (((ROC (C,LBPeriods,%) > 0) and (ROC (REF (C,LAPeriods),LAPeriods,%)
> 0))
OR
((ROC (C,LBPeriods,%) < 0) and (ROC (REF (C,LAPeriods),LAPeriods,%) <
0)), 1, 0))
/ RECINDEX()
What this is supposed to do for each day of price (close) information is
determine if the "Look-back Rate of Change" (looking back "LBPeriods"
from a particular date) and the "Look-ahead Rate of Change" (looking
ahead "LAPeriods" from a particular date) are in the same direction (ie.
have the same sign - positive or negative). The results of this daily
test (1 if true = the ROC/trend was persistent; 0 if false = the
ROC/trend was not persistent) are cumulatively added. Each day's
cumulative total is then divided by the total number of observations to
date (indicated by the Record Index or current record number for that
date). This ratio of cumulative positive results to the total number of
observations to date is what I am calling the historical Persistency of
Trend Probability.
This is obviously not an indicator, but a "screen" that I want to use to
isolate those securities (mutual funds in my case) with a minimum
historical persistency of trend probability. Once the screening has been
done, a buy signal indicator will be applied. I'll get to that later.
For now, I'd appreciate knowing if the above formula has been set up
correctly.
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
|