PureBytes Links
Trading Reference Links
|
Hello Leslie,
Thanks for the helpful reply. I never made the connection between this
and Chande's trend index. As I reviewed it and her paper, I think the first
version of KSDId and KSDIu should be the following. I don't know why she
chose to log(C[1]/C), 9, and 252 in her calculations. Still not sure how
useful this is.
Trey
{Function: Kase Serial Dependency Index Down-
this version adapts for both volatility
and cycle length}
vars: mlval(0);
{version1- from the paper, "The Best Momenutm Indicators"}
{mlval=0;
for value99 = 5 to 65 begin
mlval = maxlist(mlval,log(high[value99]) - log(low));
end;
KSDId = mlval/(StdDev(log(C/C[1]),value99)*SquareRoot(value99));}
{Function: Kase Serial Dependency Index Up-
this version adapts for both volatility
and cycle length}
vars: mlval(0);
{version1- from the paper, "The Best Momentum Indicators"}
{mlval=0;
for value99 = 5 to 65 begin
mlval = maxlist(mlval,log(high) - log(low[value99]));
end;
KSDIu = mlval/(StdDev(log(C/C[1]),value99)*SquareRoot(value99));}
-----Original Message-----
From: Leslie Walko [mailto:l.walko@xxxxxxxxxxx]
Sent: Friday, March 28, 2003 11:50 AM
To: Trey Johnson
Cc: ianwaugh@xxxxxxxxxxxxxxxxxxx; omega-list@xxxxxxxxxx
Subject: Re: On the Kase...
Trey:
Thanks for posting the EL version.
(OK, the eSignal version is truly a mess. )
Some observations about the Kase Indicator:
Even a 30 second reading of the code reminded me of Dennis Myers
(spelling?) 'polychromatic momentum'.
The basic idea of polychromatic momentum is to replace a single
look back momentum with the sum of the momentums from i, i+1,
i+2, i+3, .. n. However, since i+1 bar is further than the i
bar, we expect more momentum. Likewise, i+2 is even further, so
we expect measure more momentum --if the price made a move.
Therefore, the way to deal with this is to take the square root
of the distance from the point of observation to the target bar.
The momentum measurement is implemented here as
> for value99 = 5 to 65 begin
> mlval = maxlist(mlval,high[value99] - low);
> end;
then the square root is taken a few bars below.
So what is the Meyers-Kase 'polychromatic' 'peak' indicator
attempting to capture?
In essence the Kase is making a probability estimate of the
deviation from random displacement based on the theory of
Brownian motion. Meyers makes a quick simplification of this and
calls it 'polychromatic momentum'.
OK, does the Kase indicator work?
Is the Kase indicator useful, original?
It MIGHT work, assuming you correct the error in it.
For example, this line
> KSDId = mlval/(StdDev(log(C[1]/C),9)*SquareRoot(252));}
is not compatible with the momentum calculation because she is
taking the square root of an arbitrary constant, 252. (OK, it is
supposed to be 'annualized' ; I assume it also resonates with the
harmony of the universe, the alignment of stars, etc. If you
believe it ... )
There are some additional voodoo constants in the formula.
For example,
> if (Av + (1.33 * Sd)) > 2.08 then value1 = (Av + (1.33 * Sd))
> else value1 = 2.08;
She will claim that the voodoo constants 'correct' for the
leptokurtic distribution of prices. However, she should have
corrected that already when taking the StdDev of the Log of the
price change!
(The rest of the formula has some conceptual problems as well.
These two are just examples.)
OK, just because the formula is bogus, it COULD work?
I will not prejudge, try it.
I've tested the simplified 'polychromatic' momentum and it was
pretty useless. It makes a killing on a few markets, and lost
for all others.
OK, bad, math, results suck, but is it original?
At last, the good news!
Yes, all the computational ERRORS are ORIGINAL.
The correct version is really called the Chande Trend Index.
Tushar Chande published it in some obscure academic journal years
ago. The rest is plagiarism.
Final notes:
(1) Sorry, I am UNABLE to locate the reference.
If some kind soul has a NYIF membership, get it from their
library.
(2) Please do not send me Email to redesign the formula so that
it 'works'.
Any thermodynamics textbook contains the correct formula.
(3) Does it work?
Yes -- in hindsight.
The Index is very good at telling me what I should have done, I
should have jumped on the trend. However, the formula signals
the trend after most of the profit opportunity is gone. Frankly,
I do not need the theory of Brownian motion for this. I leave my
answering machine on and my Mother calls me and tells me what I
should have done. Unlike the math stuff, my Mother has 100%
perfect hindsight.
Cheers,
Leslie
p.s. A common observation about student papers:
"What is good, is not original; what is original is not
good."
Trey Johnson wrote:
>
> Hello Ian,
> I've seen a few different versions. But, here's the best I could do
> from reading a couple of her papers. If anyone sees anything wrong, please
> correct it, as I'm still learning easylanguage.
> I'm not sure about the Peakout line. That part of the code came from
someone
> else. Their code is below my version of the indicator. Wish I knew who it
> was so I could give them credit.
> Thanks,
> Trey
>
> {Function: Kase Serial Dependency Index Down-
> this version adapts for both volatility
> and cycle length}
>
> vars: mlval(0);
>
> {version1- from the paper, "The Best Momenutm Indicators"}
> {mlval=0;
> for value99 = 5 to 65 begin
> mlval = maxlist(mlval,high[value99] - low);
> end;
>
> KSDId = mlval/(StdDev(log(C[1]/C),9)*SquareRoot(252));}
>
> {version2- from the paper "Putting the odds on your side"}
> mlval=0;
> for value99 = 5 to 65 begin
> mlval = maxlist(mlval,(High[value99] - low)/SquareRoot(value99));
> end;
>
> KSDId = mlval/AvgTrueRange(40);
>
> {Function: Kase Serial Dependency Index Up-
> this version adapts for both volatility
> and cycle length}
>
> vars: mlval(0);
>
> {version1- from the paper, "The Best Momentum Indicators"}
> {mlval=0;
> for value99 = 5 to 65 begin
> mlval = maxlist(mlval,high - low[value99]);
> end;
>
> KSDIu = mlval/(StdDev(log(C[1]/C),9)*SquareRoot(252));}
>
> {version2- from the paper "Putting the odds on your side"}
> mlval=0;
> for value99 = 5 to 65 begin
> mlval = maxlist(mlval,(High - low[value99])/SquareRoot(value99));
> end;
>
> KSDIu = mlval/AvgTrueRange(40);
>
> {Cynthia Kase Peak Oscillator from "The Best Momentum Indicators"
> and "Putting the Odds on your side"}
>
> Inputs: Len(3); {lookback for smoothing}
> Vars: KPO(0), Av(0), SD(0);
>
> {Calculate the Kase Peak Oscillator, the difference between the
the KSDIu
> and KSDId, then smooth it}
>
> KPO=T3Average((KSDIu-KSDId),Len);
>
> Plot1(KPO,"KPO");
>
> {Calculate the Peakout Line}
>
> Av = average(KPO,LEN);
> Sd = StdDevS(KPO,LEN);
>
> if (Av + (1.33 * Sd)) > 2.08 then value1 = (Av + (1.33 * Sd))
> else value1 = 2.08;
>
> if (Av - (1.33 * Sd)) < -1.92 then value2 = (Av - (1.33 * Sd))
> else value2 = -1.92;
>
> if KPO[1] >= 0 and KPO > 0 then plot2(value1,"PeakOut");
> if KPO[1] <= 0 and KPO < 0 then plot2(value2,"PeakOut");
>
> {{The following code is what I cobbled together after reading her articles
> in Futures mag.}
> {***************************
> Peak Osc.
> ***************************}
>
> inputs:LEN(30), Smooth(3), Strength(1);
> vars: RWH(0), RWL(0),PEAK(0), MEAN(0), STD(0);
>
> RWH = (H[0] - L[LEN]) / (AvgTrueRange(LEN) * SquareRoot(LEN));
> RWL = (H[LEN] - L[0]) / (AvgTrueRange(LEN) * SquareRoot(LEN));
> PEAK = {WAverage}T3Average((RWH - RWL),3);
> MEAN = average(PEAK,LEN);
> STD = StdDevx(PEAK,LEN);
>
> if (MEAN + (1.33 * STD)) > 2.08 then value1 = (MEAN + (1.33 * STD))
> else value1 = 2.08;
>
> if (MEAN - (1.33 * STD)) < -1.92 then value2 = (MEAN - (1.33 * STD))
> else value2 = -1.92;
>
> plot1(PEAK,"PeakOsc");
> if PEAK[1] >= 0 and PEAK > 0 then plot2(value1,"+/-97.5%");
> if PEAK[1] <= 0 and PEAK < 0 then plot2(value2,"+/-97.5%");}
>
> -----Original Message-----
> From: Ian Waugh [mailto:ianwaugh@xxxxxxxxx]
> Sent: Friday, March 28, 2003 9:36 AM
> To: omega-list@xxxxxxxxxx
> Cc: ianwaugh@xxxxxxxxxxxxxxxxxxx
> Subject: On the Kase...
>
> I discovered the Kase Indicator on the eSignal site. It looks very
> interesting and I'd like to plot it in TS (2000i) but I'm afraid I
> find the eSignal language even more impenetrable than EL (which I can
> almost understand. Sort of).
>
> Anyway, I was wondering if this had been rendered into EL and if anyone
> would be kind enough to send a copy.
>
> The eSignal code is copied below should one of our wizzo programmers
> feel like doing a conversion during a spare minute.
>
> Thanks.
>
> Ian
>
> function preMain()
> {
> setPriceStudy(true);
> setStudyTitle("Kase Indicator");
> setCursorLabelName("Low", 0);
> setCursorLabelName("High", 1);
> setCursorLabelName("Median", 2);
> setDefaultBarFgColor(Color.blue, 0);
> setDefaultBarFgColor(Color.red, 1);
> setDefaultBarFgColor(Color.green, 2);
> }
> var KSDIUP = 0.0;
> var KSDIDN = 0.0;
> function main(N1)
> {
> if (N1 == null) N1 = 10;
> var Volume = getValue("Volume", 0, -(N1 + 1));
> var High = getValue("High", 0, -(N1 + 1));
> var Low = getValue("Low", 0, -(N1 + 1));
> var Close = getValue("Close", 0, -(N1 + 1));
> var i = 0;
> var TrueHigh = 0.0;
> var TrueLow = 0.0;
> var TrueRange = 0.0;
> var AvgVol = 0.0;
> var AvgTR = 0.0;
> for (i = 0; i < N1; i++)
> {
> AvgVol += Volume[i];
> if (Close[i + 1] > High[i]) TrueHigh = Close[i + 1];
> else TrueHigh = High[i];
> if (Close[i + 1] < Low[i]) TrueLow = Close[i + 1];
> else TrueLow = Low[i];
> TrueRange = TrueHigh - TrueLow;
> AvgTR += TrueRange;
> }
> AvgVol /= N1;
> AvgTR /= N1;
> if (AvgTR > 0)
> {
> KSDIUP = (High[N1] / Low[0]) / (AvgVol * Math.sqrt(N1));
> KSDIDN = (High[0] / Low[N1]) / (AvgVol * Math.sqrt(N1));
> }
> var Plot1 = null;
> var Plot2 = null;
> var Plot3 = null;
> if (KSDIUP > KSDIDN) Plot1 = Low[0];
> if (KSDIUP < KSDIDN) Plot2 = High[0];
> if (KSDIUP == KSDIDN) Plot3 = (High[0] + Low[0]) / 2;
> return new Array(Plot1, Plot2, Plot3);
> }
--
Regards,
Leslie Walko
610-688-2442
--
"Life is a tragedy for those who feel, a comedy for those who
think"
Horace Walpole, 4th earl of Orford, in a letter dated about 1770
|