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
2 registered members (Imhotep, opm), 785 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
ticks/no-ticks effect on backtesting #463629
12/18/16 14:34
12/18/16 14:34
Joined: Nov 2016
Posts: 9
K
kap Offline OP
Newbie
kap  Offline OP
Newbie
K

Joined: Nov 2016
Posts: 9
The strategy below generates suprisingly good test results on EUR/USD, GBP/USD, USD/JPY.

So good in fact I set it up running against a demo account - actual results were very different.

I have since come across the TICKS parameter and the backtest results have been cured of their optimism.

It's not clear to me why TICKS had such a profound effect on the results (especially considering that I only have M1 data, not tick data). I am also wondering when - if ever - testing should be done without TICKS given the misleading results.

During testing what is the logic for simulating execution prices and times given entry stop & limit prices, stop prices and take profits?

-K

Code:
//
// no_ticks_skys_the_limit
//
	function run() {
	BarPeriod   = 30;
	Hedge       = 0;
	Weekend     = 2;
	StartDate   = 2010;
	EndDate     = 20160930;
	Lots        = 10000;

	vars prices = series(price());
	var  ema    = EMA(prices, 7);
	var  atr    = ATR(7);

	Entry       = -ema;
	TakeProfit  = atr*0.5;
	Stop        = atr*5;

	if (priceLow()  > ema && NumOpenLong  <= 0)	{ enterLong (); }
	if (priceHigh() < ema && NumOpenShort <= 0)	{ enterShort(); }
}



Code:
Test no_ticks_skys_the_limit EUR/USD

Simulated account   AssetsFix 
Bar period          30 min (avg 43 min)
Test period         05.01.2010-01.10.2016 (81755 bars)
Lookback period     80 bars (40 hours)
Monte Carlo cycles  200
Simulation mode     Realistic (slippage 5.0 sec)
Spread              1.1 pips (roll -0.10/-0.11)
Contracts per lot   1.0

Gross win/loss      41691$ / -16674$ (+28109p)
Average profit      3714$/year, 309$/month, 14$/day
Max drawdown        -263$ 1% (MAE -263$ 1%)
Total down time     47% (TAE 17%)
Max down time       27 days from Oct 2014
Max open margin     264$
Max open risk       348$
Trade volume        102405046$ (15202334$/year)
Transaction costs   -8846$ spr, -235$ slp, -8.53$ rol
Capital required    440$

Number of trades    9036 (1342/year, 26/week, 6/day)
Percent winning     87.7%
Max win/loss        33$ / -151$
Avg trade profit    2.77$ 3.1p (+5.9p / -16.8p)
Avg trade slippage  -0.03$ -0.0p (+0.3p / -2.1p)
Avg trade bars      1 (+1 / -5)
Max trade bars      43 (21 hours)
Time in market      20%
Max open trades     1
Max loss streak     4 (uncorrelated 4)

Annual return       845%
Profit factor       2.50 (PRR 2.40)
Sharpe ratio        9.33
Kelly criterion     10.31
R2 coefficient      0.890
Ulcer index         0.1%

Confidence level     AR   DDMax  Capital

 10%                900%   222$  413$
 20%                881%   236$  422$
 30%                872%   242$  426$
 40%                861%   250$  431$
 50%                855%   255$  434$
 60%                849%   259$  437$
 70%                843%   264$  440$
 80%                837%   269$  444$
 90%                826%   278$  450$
 95%                812%   289$  457$
100%                712%   386$  522$

Portfolio analysis  OptF  ProF  Win/Loss  Wgt%

EUR/USD             .999  2.50  7921/1115  100.0  
EUR/USD:L           .999  2.39  3886/585   47.2  
EUR/USD:S           .999  2.62  4035/530   52.8


Re: ticks/no-ticks effect on backtesting [Re: kap] #463635
12/18/16 21:34
12/18/16 21:34
Joined: Feb 2015
Posts: 652
Milano, Italy
M
MatPed Offline
User
MatPed  Offline
User
M

Joined: Feb 2015
Posts: 652
Milano, Italy
Hi, not an expert but with such tiny Stop and TakeProfit the simulation become unrealistic especially when the volatility is low. The accuracy granted by M1 bar is not enough.

Ciao

Re: ticks/no-ticks effect on backtesting [Re: MatPed] #463640
12/19/16 14:17
12/19/16 14:17
Joined: Feb 2014
Posts: 73
Montreal, Qc Canada
F
Finstratech Offline
Junior Member
Finstratech  Offline
Junior Member
F

Joined: Feb 2014
Posts: 73
Montreal, Qc Canada
Try this on T1 data, you'll see more or less close to reality results. But if the results are overly optimistic, take it with a grain of salt.


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