Gamestudio Links
Zorro Links
Newest Posts
Trading Journey
by howardR. 04/24/24 20:04
M1 Oversampling
by Petra. 04/24/24 10:34
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Data from CSV not parsed correctly
by EternallyCurious. 04/20/24 21:39
Scripts not found
by juergen_wue. 04/20/24 18:51
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
folder management functions
by VoroneTZ. 04/17/24 06:52
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, howardR), 472 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Mega_Rod, EternallyCurious, howardR, 11honza11, ccorrea
19048 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Minimum trades for a system to be reliable? #436114
01/20/14 09:34
01/20/14 09:34
Joined: Jan 2013
Posts: 68
I
ibra Offline OP
Junior Member
ibra  Offline OP
Junior Member
I

Joined: Jan 2013
Posts: 68
Hey,

The thought occured to me while I was coding a simple crossover strategy. As the timeframe is 1440(daily) the strategy enters only 89 trades during the period (2002-2013). I'm worried that it's not enough for me to "trust" the result.

What's your opinion about this?

Re: Minimum trades for a system to be reliable? [Re: ibra] #436130
01/20/14 15:08
01/20/14 15:08
Joined: Jul 2000
Posts: 27,982
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,982
Frankfurt
It depends on the degrees of freedom - the number of free parameters - of your system. As a rule of thumb, you should have more than 30, preferably about 100 trades per degree of freedom for a result of significance.

Re: Minimum trades for a system to be reliable? [Re: jcl] #436184
01/21/14 10:34
01/21/14 10:34
Joined: Jan 2013
Posts: 68
I
ibra Offline OP
Junior Member
ibra  Offline OP
Junior Member
I

Joined: Jan 2013
Posts: 68
Hi!

Originally Posted By: jcl
It depends on the degrees of freedom - the number of free parameters - of your system. As a rule of thumb, you should have more than 30, preferably about 100 trades per degree of freedom for a result of significance.


Would be deeply grateful if you could explain that with an example. I looked it up in Trading Systems by Tomasini and Jaekle. But I'm not sure if I got it right.

And since the WFO-window is a couple of years shorter, there will be a lot less trade. I guess this is "normal, but how does the minimum requirment looks for WFO?

Also, do you think it's wise to keep number of trades above a ceratin level per year. Let's say 10? A moving average crossover-system doesn't give too many signals per year, what I can tell.



Thanks

Last edited by ibra; 01/21/14 10:43.
Re: Minimum trades for a system to be reliable? [Re: ibra] #436192
01/21/14 13:12
01/21/14 13:12
Joined: Jul 2000
Posts: 27,982
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,982
Frankfurt
For example, when you open and close positions when two moving averages cross, you have a system with 2 degrees of freedom - the time periods of the two moving averages.

Not having enough trades is indeed a common problem when developing systems. You can increase the number of trades with methods such as oversampling, but it helps only to a certain degree. A system with only 10 trades per year has a large margin of error.

Re: Minimum trades for a system to be reliable? [Re: jcl] #436194
01/21/14 13:37
01/21/14 13:37
Joined: Jul 2013
Posts: 522
D
dusktrader Offline
User
dusktrader  Offline
User
D

Joined: Jul 2013
Posts: 522
Thanks for this info about "degrees of freedom" jcl. I never looked at it that way before but it makes sense and gives a good rule-of-thumb I think.

Another way to increase # of trades is to reduce the BarPeriod/TimeFrame. That is one reason I've chosen to focus on smaller timeframes, even though I know they may be overall less profitable. I think it is also a balance of risk, because while higher timeframes may equate to better profit and accuracy, it may also increase risk by holding positions open longer. I would prefer to take profit off the table in smaller increments, repeatedly.

@ibra here is a code snippet that I use that warns you when your script produces less than the desired # of trades, and will stop training your script in that case:
Code:
function checkTradesPerCycle()
{
	//require minimum 30 trades per WFO cycle or stop training
	static int LastWFOCycle = 0, LastNumTrades = 0;
	if(Train && (WFOCycle != LastWFOCycle) )
	{
		if(LastNumTrades > 0 and LastNumTrades < 30)
		{
			char tradecount[100];
			sprintf(tradecount,"Not enough trades per cycle: %d",LastNumTrades);
			quit(tradecount);
		}
		LastWFOCycle = WFOCycle;
	}
	LastNumTrades = NumWinTotal+NumLossTotal;
}


Re: Minimum trades for a system to be reliable? [Re: dusktrader] #436199
01/21/14 14:22
01/21/14 14:22
Joined: Jan 2013
Posts: 68
I
ibra Offline OP
Junior Member
ibra  Offline OP
Junior Member
I

Joined: Jan 2013
Posts: 68
Thanks both of you!

Yes, I've thought about that too, to change timeframe, but it doesn't really produce a satisfying result then. Well well, I'll continue my progress and we'll see what happens.

Ibra

EDIT: Jcl, what does margin of error means? I tried to look it up in the performance report section in the manual(which looks kinda bugged for the record) but I didn't find anything.

Thanks again

Last edited by ibra; 01/21/14 15:07.

Moderated by  Petra 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1