[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

INDICATOR - Zscore



PureBytes Links

Trading Reference Links

The attached chart shows an application of the Z score to multidata series
with
SPX in visible Data1                 
TYX in hidden subgraph Data2  (T bond yields)
CRY in hidden subgraph Data3 (Commodity index)
DXY in hidden subgraph Data4  (US dollar index)

The indicator is inserted four times and scaled the same each time so the
0,+,- std dev overlap for each insertion.  Below is the code used to create
the Z score indicator.  An if statement may need to be added to avoid a divide
by zero error.  One of the apparant uses is for buying or selling when the spx
Z score crosses the zero line.  As with stochastics it will remain saturated
in trends.  Another of the gotchas is if the trend is much longer than the L1
input.  In that case the Z score will do a mean reversion back to the zero
line.
-------------------------
INPUTS: L1(18),Std1(2),Std2(-2);

VALUE1 = (C-AVERAGE(C,L1))/StdDev(C,L1);
VALUE2 = Std1;
VALUE3 = Std2;
VALUE4 = 0;

PLOT1(VALUE1,"Z SCORE C");
PLOT2(VALUE2,"+stdev");
PLOT3(VALUE3,"-stdev");
PLOT4(VALUE4,"zero");
---------------------------------------
BobR

Attachment Converted: "c:\eudora\attach\ZSCORE.gif"