JACK HERSHEY METHOD EXPOSED AS FRAUD! *Debated*

Status
Not open for further replies.
Quote from MandelbrotSet:

I know how, don't want to go the automated trading route.

There's a world of difference between coding a system, executing a backtest on a system, and actually being able to generate real-time profits with the system.

P.S. Without observing the system in real-time and knowing in-depth how it works, any trader will tell you that your backtest means bupkis ... especially when you've flipped-the-script so readily.

It's a natural part of development.
 
Quote from frostengine:

I decided to convert this over to NinjaTrader. And I tested on 5 min ES data from 7/2003 to 10/21/2008. Here is the code I used. I tried to stick as closely as possible to ScottD's implementation

CashCow automated trading system
Architect: Jack Hershey
Version 0.3
12 Dec 2008

The only thing In my implementation I am unsure of is the stochastics. I may have used wrong parameters there.. Can someone verify this for me and I can rerun the tests. Let me know what is wrong in the conversions and I can make changes.


Most assuredly these are the wrong stochastics, because the moves overnight are not being smoothed, and that's what the MACDex does.

Here is the code:

bool timeOK=false;
bool volumeOK=false;
bool currentbarOK=false;
bool LongOK=false;
bool ShortOK=false;

//I am on Central time hence the time difference...
if(this.Time[0].Hour>=8&&Time[0].Minute>=45&&Time[0].Hour<15)
timeOK=true;

if(Volume[1]>20000)
volumeOK=true;

if(this.CurrentBar>2)
currentbarOK=true;

if(MACD(5,13,6).Diff[0]>0)
LongOK=true;

if(MACD(5,13,6).Diff[0]<0)
ShortOK=true;

//I may be using the wrong Stochastic parameters...
//Stochastics(D,K,Smooth)
double Stoch5FastK=Stochastics(2,5,3).K[0];
double Stoch5FastKLast=Stochastics(2,5,3).K[1];
double Stoch5FastD=Stochastics(2,5,3).D[0];
double Stoch5FastDLast=Stochastics(2,5,3).D[1];

double Stoch14SlowK=Stochastics(1,14,3).K[0];
double Stoch14SlowKLast=Stochastics(1,14,3).K[1];
double Stoch14SlowD=Stochastics(1,14,3).D[0];
double Stoch14SlowDLast=Stochastics(1,14,3).D[1];

if(currentbarOK==true&&timeOK==true)
{
if(volumeOK==true&&this.Position.MarketPosition==MarketPosition.Flat)
{
if(LongOK==true && Stoch5FastK>50&&Stoch5FastKLast<50&&Stoch5FastK>Stoch5FastD)


This is cross above 50, big difference.
{
EnterLong(1,"");
}

if(ShortOK==true && Stoch5FastK<50&&Stoch5FastKLast>50&&Stoch5FastK<Stoch5FastD)

Here's the problem, this isn't LESS THAN 50, it's crossing below or above 50.
In this case we cross below 50 for the short
{
EnterShort(1,"");
}
}

if(volumeOK==true)
{
if(ShortOK==true && Stoch5FastK<50&&Stoch5FastKLast>50&&this.Position.MarketPosition==MarketPosition.Long)
{
EnterShort(1,"");
}

if(LongOK==true && Stoch5FastK>50&&Stoch5FastKLast<50&&this.Position.MarketPosition==MarketPosition.Short)
{
EnterLong(1,"");
}
}

if(Position.MarketPosition==MarketPosition.Long&&Math.Abs(MACD(5,13,6)[0])<1.4)

This is supposed to be the difference between that MACD and the 6 period MACDSMA absolute value.
{
if(Stoch14SlowK<Stoch14SlowD&&Stoch14SlowK<80&&Stoch14SlowKLast>80)


again, this is cross below 80, not simply, less than 80, wait....I see what you're doing, the last was greater than 80.


{
ExitLong();
}

if(Stoch14SlowK<Stoch14SlowD&&Stoch14SlowKLast>Stoch14SlowDLast)
{
ExitLong();
}

if(Stoch5FastK<50&&Stoch5FastKLast>50)
{
ExitLong();
}
}

if(Position.MarketPosition==MarketPosition.Short&&Math.Abs(MACD(5,13,6)[0])<1.4)
{
if(Stoch14SlowK>Stoch14SlowD&&Stoch14SlowK>20&&Stoch14SlowKLast<20)
{
ExitShort();
}

if(Stoch14SlowK>Stoch14SlowD&&Stoch14SlowKLast<Stoch14SlowDLast)
{
ExitShort();
}

if(Stoch5FastK>50&&Stoch5FastKLast<50)
{
ExitShort();
}
}
}

if(this.Time[0].Hour>=15)
{
ExitLong();
ExitShort();
}


Yeah, it's good except for the MACD difference. That's ABS MACD-MACDSMA for those values<1.4.
 
Quote from frostengine:

Which version of code from ScottD did you convert? The latest one i see is:

CashCow automated trading system
Architect: Jack Hershey
Version 0.3
12 Dec 2008

From dec 12. Are you using a newer one? If not I see a difference in your conversion, granted I do not know WL specifically, but I think there is an error there...

The difference comes in the managing of the position once you already have an open position.

Looking at ScottD's implementation I see:
"if absvalue( MACDVal ) < 1.4 then }
if {(Stoch14SlowK < Stoch14SlowD) and} (Stoch14SlowK crosses below 80) and marketposition > 0"

where if the current macdval < 1.4

however for yours I see:
"if (positionlong(lastposition)) and (abs(@HersheyStochD[bar]-SMA(Bar,HersheyStochD,6))<1.4) then begin sellatmarket(Bar+1,LastPosition,''); end;"

It appears in yours, if your long and stochd-6 period SMA of stochd <1.4

So your code is different.

I copied from the original. Around page 9-12, possibly 16 or 17.
 
Quote from frostengine:

The results include commission as well as 1 tick slippage:

Profit: -$1,482
Trades: 289
Win%: 44.29
PF: .97

Granted, my conversion may be off, but just let me know where the conversion falls short and I can rerun.

EDIT:
The backtest stoped at 10/21/2008, but in aug and sept of this month the profit shot way up. Which might explain why your recent backtest showed it being very profitable

First, I think you'll have better results on 15 minute bars, because that's where I found the most success with the system.

Second, I'm glad you're getting boffo numbers in the most recent parts of the backtest.

Yeah, try it on 15 minute bars, and come back, because the code is correct, save for the MACD-MACDSMA absolute value calculation.
 
Are you sure its suppose to be the SMA of the MACD? Looking at ScottD's code I see:

absvalue( MACDVal ) < 1.4

And up above MACDVal is:
MACDVal = MACD( Close, 5, 13 ) ;

So are you sure I have it wrong?
 
This is what I got:
for Bar := 5 to BarCount - 1 do
begin


This stuff does not appear relevant to the script

var SMADiff : float =(SMA( bar, #close , 20 ) - SMA( bar - 1, #close, 20 ));
var MACDday : integer = MACDExSeries( #Close, val1, val2 );




if (bar>lbar+2) then begin
if we're greater than 2 bars away from the closing bar of yesterday, then:

if not (lastpositionactive) and (crossovervalue(bar,HersheyStochK,50) ) and (@#Volume[bar]>20000) and (gettime(bar)<1545) then begin
buyatmarket(Bar+1,'Jacks friend scott d says to buy here');
end;
if not (lastpositionactive) and (crossundervalue(Bar,HersheyStochK,50)) and (@#Volume[bar]>20000) and (gettime(bar)<1545) then begin


Damnit anyway, I guess I left the window open and didn't close it before I posted the version. I've had to modify what I posted as the final version for this, but the backtest I got was based on those changes, so that doesn't affect the results.

shortatmarket(Bar+1,'Jacks friend scott d says to sellshort here');
end;
if (positionlong(lastposition)) and (@HersheyStochK[bar]<@HersheyStochD[bar]) and (crossundervalue(Bar,HersheyStochK,80)) and (gettime(bar)<1545) then begin
sellatmarket(Bar+1,LastPosition,'');
end;





if (positionshort(lastposition)) and (@HersheyStochK[bar]>@HersheyStochD[bar]) and (crossovervalue(Bar,HersheyStochK,20)) and (gettime(bar)<1545) then begin
coveratmarket(Bar+1,lastposition,'');
end;


This is where the meat is:

if (positionlong(lastposition)) and (abs(@HersheyStochD[bar]-SMA(Bar,HersheyStochD,6))<1.4) then begin sellatmarket

If we're long, and the absolute value of the difference between the HersheyStochD on this bar - the HersheyStochDSMA is less than 1.4 then:

(Bar+1,LastPosition,''); end;


if we're short, and that absolutevalue difference is less than 1.4 then
if (positionshort(lastposition)) and (abs(@HersheyStochD[bar]-SMA(Bar,HersheyStochD,6))<1.4) then begin coveratmarket(Bar+1,LastPosition,''); end;



this is the same
if (positionlong(lastposition)) and (lastbar(bar)) then begin sellatclose(Bar,lastposition,'');end;
if (positionshort(lastposition)) and (lastbar(bar)) then begin coveratclose(Bar,lastposition,'');end;



end;

this is just a call for the lastbar of the day. When the bar tomorrow is greater than this by 2, it's time to buy.
if lastbar(bar) then begin
lbar:=bar;
end;


end;
 
15 min results look a lot worse:

profit; -$12,662
trades: 390
PF: .72

I am using all ES data when forming the bars which are used for calculating the indicators...

I am going to try again now with restricting the bars used to between 8:30 and 3:00 central.

5 Min Results;
Profit: -$1,990
Trades:258
PF:.95

15 Min Results:
Profit: +$5,840
Trades:537
PF:1.08
 
Quote from frostengine:

15 min results look a lot worse:

profit; -$12,662
trades: 390
PF: .72

I am using all ES data when forming the bars which are used for calculating the indicators...

I am going to try again now with restricting the bars used to between 8:30 and 3:00 central.

5 Min Results;
Profit: -$1,990
Trades:258
PF:.95

15 Min Results:
Profit: +$5,840
Trades:537
PF:1.08

I figured out the problem. Where you're using volume data on the current bar, use it on the previous bar. That is, they literally mean the volume of 1 bar ago. I think that's where we are tripping up. And I just compared what I posted, and I tried switch the bar of 1 bar ago with the current bar, and the results are substantially different.
 
Quote from frostengine:

Are you sure its suppose to be the SMA of the MACD? Looking at ScottD's code I see:

absvalue( MACDVal ) < 1.4

And up above MACDVal is:
MACDVal = MACD( Close, 5, 13 ) ;

So are you sure I have it wrong?

And if you looked closer you'll find it's different. Yes I'm sure you have that wrong. The volume value you were using was fine, too.

Ex post, the MACD are the same. For some reason, older versions used MACDex, so in that irrelevant portion would have been the MACDex section. We're just dealing with regular MACD's.
 
"JACK HERSHEY METHOD EXPOSED AS FRAUD! *Debunked*"






Whoo Hoo we've all been saved from the ravages of the Hershey Highway method!






Now, can we please move on?
 
Status
Not open for further replies.
Back
Top