Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
5 registered members (TipmyPip, AndrewAMD, Quad, aliswee, degenerate_762), 970 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
WFO/WRC interpretation #467384
07/30/17 17:16
07/30/17 17:16
Joined: Jun 2017
Posts: 78
B
BobbyT Offline OP
Junior Member
BobbyT  Offline OP
Junior Member
B

Joined: Jun 2017
Posts: 78
As the title suggests I would like some help/opinions/advice on some results from the above tests.

Here are the confidence levels for the strategy with NumWFOCycles = 8

Code:
Confidence level     AR   DDMax  Capital
 10%                771%    47$  62$
 20%                739%    50$  64$
 30%                713%    52$  67$
 40%                690%    54$  69$
 50%                665%    57$  72$
 60%                644%    60$  74$
 70%                613%    63$  78$
 80%                581%    68$  82$
 90%                532%    76$  90$
 95%                487%    84$  98$
100%                432%    98$  110$


The way I see these results is that the strategy has a positive expectancy at all levels of probability. But that doesn't seem right to me.

So I ran the script with various Detrend settings (SHUFFLE+CURVE, INVERT, PRICES, TRADES, SHUFFLE, CURVE). Only 2 of these had an adverse effect on the confidence levels.
Code:
SHUFFLE+CURVE:
Confidence level     AR   DDMax  Capital
 10%                411%    67$  81$
 20%                373%    76$  90$
 30%                355%    81$  94$
 40%                337%    86$  99$
 50%                322%    91$  104$
 60%                308%    96$  109$
 70%                288%   104$  116$
 80%                266%   114$  126$
 90%                237%   130$  142$
 95%                228%   136$  147$
100%                163%   198$  206$

PRICES:
Confidence level     AR   DDMax  Capital
 10%                -258%    44$  59$
 20%                -247%    47$  62$
 30%                -237%    49$  64$
 40%                -227%    52$  67$
 50%                -218%    55$  70$
 60%                -211%    58$  72$
 70%                -202%    61$  76$
 80%                -188%    67$  81$
 90%                -167%    78$  91$
 95%                -159%    82$  96$
100%                -130%   105$  117$


From what I can gather from the manual, SHUFFLE+CURVE should remove any true edge of the system however it only reduces it (by ~50%). The manual states this may be due to 'artifacts' but there is no mention (examples) of what 'artifacts' may be.
PRICES gives a negative expectancy likely due to the use of LowPass and ATR in the strategy (and this makes sense to me).

Running a WRC as found in Alice4b, I am informed that the result from the vanilla system has a 26.1% random probability. This is clear as day that the strategy exhibits no clear edge and essentially random.

So what's my point? Even though running 1000 permutations on SHUFFLE(d) prices indicates that the system is 'random', the WFO on non-detrened prices indicates a positive expectancy at all levels of confidence.

So what's my question? Well...what does this mean? Does it mean that the system has found some level of inefficiency but is still essentially random? Does it mean that even though it is essentially random, that it 'cannot lose'? Does it men something else entirely that my uninformed mind cannot fathom?

Some help in interpreting these data would be a great help.

Cheers,
BobbyT

Re: WFO/WRC interpretation [Re: BobbyT] #467387
07/31/17 07:41
07/31/17 07:41
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
That's interesting. I would also like to know which artifacts can cause such a positive result on a randomized price curve. Can you post that system?

Re: WFO/WRC interpretation [Re: jcl] #467398
07/31/17 18:04
07/31/17 18:04
Joined: Jun 2017
Posts: 78
B
BobbyT Offline OP
Junior Member
BobbyT  Offline OP
Junior Member
B

Joined: Jun 2017
Posts: 78
Glad to see I'm not I'm not completely losing my mind on this one laugh

Sure. Here it is. The above results were obtained on EURUSD. It was actually a strategy another member here posted (sdh309795gaas for full disclosure). The WRC code is in place and commented out:

Code:
function run()
{
	//settings
	set(PLOTNOW);
	StartDate = 2010;
	EndDate = 2015;
	BarPeriod = 240; 
	NumWFOCycles = 8;

		//permute the curve for WRC
		/*if(Test) {
			Detrend = SHUFFLE;
			NumTotalCycles = 1000;
		}*/

	//PriceSeries
	vars Price = series(price());

	//Indicator variables
	var ATR_multi = 1; 
	var ATR_period = 100;
	var LP_period = 10;

	//ATR Bands
	vars middle = series(LowPass(Price,LP_period));
	vars upperATR = series(LowPass(Price,LP_period)+ATR_multi*ATR(ATR_period));
	vars lowerATR = series(LowPass(Price,LP_period)-ATR_multi*ATR(ATR_period));

	//TradeManagement
	TakeProfit = middle[0];
	EntryTime = 1;

	//TradeLogic
	Entry = -lowerATR[0];
	reverseLong(1);

	Entry = -upperATR[0];
	reverseShort(1);

	//plot 
	plot("upperATR",upperATR,MAIN,GREY);
	plot("lowerATR",lowerATR,MAIN,GREY);
}

//white's reality check (from Alice4b script)
/*function evaluate()
{
	var TestProfit = 1560;
	static int Count = 0;
	if(Balance > TestProfit)
		Count++;
	
	var Bucket = floor(Balance/25);
	plotBar("Profit",Bucket,25*Bucket,1,SUM+BARS+LBL2,RED);	

	if(TotalCycle == NumTotalCycles) {
		var Probability = (100.*Count)/NumTotalCycles;
		printf("n-------------------------------------------");
		printf("nReality Check: %.1f%% Random Probability",Probability);
		if(Probability <= 1)
			printf("nSystem result is significant");
		else if(Probability <= 5)
			printf("nSystem result is possibly significant");
		else 
			printf("nSystem result is not statistically significant");
		printf("n-------------------------------------------");
	} 
}*/



Looking forward your insight on this one! grin

Cheers,
BobbyT

EDIT: run on Zorro v1.58

Last edited by BobbyT; 07/31/17 18:07.
Re: WFO/WRC interpretation [Re: BobbyT] #467425
08/01/17 21:50
08/01/17 21:50
Joined: Jun 2017
Posts: 78
B
BobbyT Offline OP
Junior Member
BobbyT  Offline OP
Junior Member
B

Joined: Jun 2017
Posts: 78
So is it the 'randomness' (read: 'unfiltered') of the entries that has given rise to the above anomaly or is there something more serious at play here?

Or have I just made a considerable error in the code that I can't seem to see (believe me, I've looked, looked again and then looked some more to make sure this wasn't the case)?

Cheers,
BobbyT

Re: WFO/WRC interpretation [Re: BobbyT] #467430
08/02/17 06:06
08/02/17 06:06
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
There are good news and bad news. The bad news is that this system is probably not profitable. The good news is that you can easily see it - just set TICKS.

It's no randomness. SHUFFLE makes no difference. It's simply entering and exiting inside the same bar. With no intrabar data, Zorro can only guess the entry and exit prices from the bar range and the limits. You`ve choosen the limits so that the results are mostly positive. You can not test such a system without TICKS.

Re: WFO/WRC interpretation [Re: jcl] #467431
08/02/17 06:48
08/02/17 06:48
Joined: Jun 2017
Posts: 78
B
BobbyT Offline OP
Junior Member
BobbyT  Offline OP
Junior Member
B

Joined: Jun 2017
Posts: 78
Of course!!!

It's so bleeding obvious when you point it out. I'll have a bit more of a play with it and see what I can get out of it, but as mentioned earlier it's not my idea/code so there is nothing really lost if it falls through.

I had noticed intrabar closures in the log but it was not consistent so I wasn't sure what to make of it.

One step close to getting half-way proficient with Zorro. Thanks JCL laugh

Cheers,
BobbyT

Re: WFO/WRC interpretation [Re: BobbyT] #467432
08/02/17 06:53
08/02/17 06:53
Joined: Jun 2017
Posts: 78
B
BobbyT Offline OP
Junior Member
BobbyT  Offline OP
Junior Member
B

Joined: Jun 2017
Posts: 78
Just ran a quick test with TICKS, and it was profitable....just.

Like an AR of just a few pips gain over 5 years profitable hahaha


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1