Determining the percentage of a given system

Using both the stochastic and the 200 MA trend as filters wasn’t working as no trades met the entry condition.
So I used the Stochastic as that goes into overbought and oversold a lot more. Over the 5 year test period we had only 7 trades and ended in the red.


function run()
{
////	set(TICKS);
	StartDate = 2008; // Date to start trading from
	BarPeriod = 60;   // 1 Hour bars
	LookBack = 250;
		
	
	//Price Series to be used
	vars Price = series(priceClose());        // Price based on the close of the daily bar
	vars FastEMA = series(EMA(Price,10));   // 10 period EMA
	vars SlowEMA = series(EMA(Price,20));    // 20 period EMA 
	vars FilterEMA = series(EMA(Price,200)); // Using the 200 daily EMA as a price filter
	Stoch(13,3,MAType_SMA,3,MAType_SMA);     // Stochastic Indicator
	vars FilterRSI = series(RSI(Price,0)); 
	
	//Entry Conditions
		if(crossOver(FastEMA,SlowEMA)	&& Price[0]>FilterEMA[0] 
			&& FastEMA[0]>FilterEMA[0] && SlowEMA[0]>FilterEMA[0] 
			&& rSlowK<30 && rSlowD<30){
			enterLong();
		}
		if(crossUnder(FastEMA,SlowEMA) && Price[0]<FilterEMA[0] 
			&& FastEMA[0]<FilterEMA[0] && SlowEMA[0]<FilterEMA[0] 
			&& rSlowK>70 && rSlowD>70){
			enterShort();
		}
}

GBPJPY

Agree, a high trending pair such as the various yen pairs over the last year wont be very good candidates for testing trending systems. They will definitely give biased results based unless we detrend the price series before testing the system on it.

Thanks liftof for doing this :slight_smile: I wanted to see the results from first hand…can you give me the numericals for the GBPUSD in % for your previous post…I’m wondering if the percentage is higher than 40%

These are the detailed numbers.


BackTest babypipstest1 GBP/JPY - performance report

Test period         17.01.2008-10.01.2014
Lookback time       250 bars (15 days)
Assumed slippage    10.0 sec
Assumed spread      8.6 pips (roll 6.12/-13.50)
Contracts per lot   1000

Gross win/loss      864$ / -5292$ (-46408p)
Average profit      -740$/year, -62$/month, -2.85$/day
Max drawdown        -5007$ -113% (MAE -5096$ -115%)
Total down time     91% (TAE 93%)
Max down time       248 weeks from Nov 2008
Largest margin      63$
Trade volume        23284$ (3891$/year)
Transaction costs   -14$ spr, -0.90$ slp, -5213$ rol
Capital required    3608$

Number of trades    17 (3/year, 1/week, 1/day)
Percent winning     24%
Max win/loss        321$ / -1104$
Avg trade profit    -260$ -2729.9p (+216$ / -407$)
Avg trade slippage  -0.05$ -0.6p (+0.02$ / -0.12$)
Avg trade bars      4871 (+1918 / -5779)
Max trade bars      20301 (175 weeks)
Time in market      228%
Max open trades     7
Max loss streak     7 (uncorrelated 13)

Annual return       -21%
Profit factor       0.16 (PRR 0.06)
Sharpe ratio        -1.64
Kelly criterion     -13.04
Ulcer index         882.5%
Prediction error    133%

Portfolio analysis  OptF  ProF  Win/Loss  Wgt%

GBP/JPY             .000  0.16    4/13   100.0  
GBP/JPY:L           .046  4.80    3/1     -9.7  
GBP/JPY:S           .000  0.06    1/12   109.7  


It is actually a losing strategy. -21% per annum loss

Wow…only 24% of wining trades :o

Yep. Trend following systems have low win rates.

Wow, didn’t know that…

Well atleast most of the ones I have tested have really low win rates but their average pips per win can be high enough to tilt the scales in your favor.