![](http://investorshub.advfn.com/images/default_ih_profile2_4848.jpg?cb=0)
Saturday, March 04, 2006 3:56:34 PM
ALL: Group Trading System Backtest Results.
Ok, I finally got the backtesting done! Amibroker seems to have a problem with doing more than 2 logical compares per line of code (see bear_short_a and bear_short_b in the code below.
I can not seem to find the current year by year returns, but this is what I come up with:
If someone could verify/correct these yearly results, please post them. Below the AmiBroker system test results is a list of the 2005 trades. Could someone also please verify/correct these trades.
And here is the 2005 trade list:
Ok, I finally got the backtesting done! Amibroker seems to have a problem with doing more than 2 logical compares per line of code (see bear_short_a and bear_short_b in the code below.
I can not seem to find the current year by year returns, but this is what I come up with:
Year System Return
1986 22.37
1987 65.27
1988 26.27
1989 25.83
1990 17.01
1991 53.56
1992 20.78
1993 38.90
1994 26.01
1995 74.10
1996 80.37
1997 85.73
1998 38.87
1999 22.71
2000 53.14
2001 7.79
2002 32.50
2003 20.13
2004 47.76
2005 12.29
If someone could verify/correct these yearly results, please post them. Below the AmiBroker system test results is a list of the 2005 trades. Could someone also please verify/correct these trades.
Initial Equity: 10000 Periodicity/Positions: Daily/Long Short
Commissions: 0.00 (Use portfolio settings) Annual interest rate: 0.00%
Range: 1/1/1986 00:00:00 - 12/31/2005 Apply to: Current Symbol
Margin requirement: 100 Futures mode: No
Def. round lot size: 0 Def. Tick Size 0
Drawdowns based on: Close prices
Long trades
Buy price: Close Sell price: Close
Buy delay: 0 Sell delay: 0
Short trades
Short price: Close Cover price: Close
Short delay: 0 Cover delay: 0
Stops
Maximum loss: disabled Profit target: disabled
Value: 2.00 Value: 2.00
Exit at stop? no Exit at stop? yes
Trailing stop: disabled
Value: 2.00
Exit at stop? no
Formula
data=OscP(5,10);
Bull_mode=IIf(data>Ref(data,-1),1,0);
Bear_mode = NOT Bull_mode;
Adv=Foreign("NASDAQ_advn","C");
Dec=Foreign("NASDAQ_decln","C");
diff=1000*((Adv-Dec)/(Adv+Dec));
Osc=EMA(diff,19)-EMA(diff,39);
NASI=19*EMA(diff,39) - 9*EMA(diff,19);
NASI_signal=EMA(NASI,4) > EMA(NASI,24);
NDX_signal=Close > EMA(Close,10);
RSI_signal_buy=Cross(28,RSI(5));
RSI_signal_sell=Cross(RSI(5),50);
RSI_signal=Flip(RSI_signal_buy,RSI_signal_sell);
bear_short_a=NOT(RSI_signal OR NASI_signal);
bear_short_b=(MDI(10)<50 AND RSI(3) > 71);
bear_short=bear_short_a OR bear_short_b;
bear_long = NOT bear_short;
bull_long=(NDX_signal OR RSI_signal OR NASI_signal);
bull_short= NOT bull_long;
Buy=IIf(Bull_mode,bull_long,bear_long);
Sell= NOT Buy;
Short=Sell;
Cover=Buy;
Performance for ^NDX
Total net profit: 6684986.13 Total commissions paid: 0.00
Return on account: 66849.86 % Open position gain/loss -159480.27
Buy&Hold profit: 115343.79 Bars (days) in test: 5047 (7303)
Buy&Hold % return: 1153.44% System to Buy&Hold index: 5695.71%
Annual system % return: 38.43% Annual B&H % return: 13.47%
System drawdown: -238.26 B&H drawdown: -215.61
Max. system drawdown: -1155459.77 B&H max. drawdown: -297138.38
Max. system % drawdown: -45.05% B&H max. % drawdown: -82.90%
Max. trade drawdown: -856828.33
Max. trade % drawdown: -36.18%
Trade drawdown: -752852.93
Total number of trades: 787 Percent profitable: 53.4%
Number winning trades: 420 Number losing trades: 367
Profit of winners: 17753879.50 Loss of losers: -10909413.10
Total # of bars in winners: 3603 Total # of bars in losers: 2207
Commissions paid in winners: 0.00 Commissions paid in losers: 0.00
Largest winning trade: 598842.80 Largest losing trade: -631797.57
# of bars in largest winner: 59 # bars in largest loser: 29
Commission paid in largest winner: 0.00 Commission paid in largest loser: 0.00
Average winning trade: 42271.14 Average losing trade: -29725.92
Avg. # of bars in winners: 8.6 Avg. # bars in losers: 6.0
Avg. commission paid in winner: 0.00 Avg. commission paid in loser: 0.00
Max consec. winners: 10 Max consec. losers: 8
Bars out of the market: 1 Interest earned: 0.00
Exposure: 100.0% Risk adjusted ann. return: 38.44%
Ratio avg win/avg loss: 1.42 Avg. trade (win & loss): 8696.91
Profit factor: 1.63
And here is the 2005 trade list:
Short 12/31/04
Long 01/04/05
Short 01/19/05
Long 01/20/05
Short 02/03/05
Long 02/04/05
Short 02/09/05
Long 02/11/05
Short 02/17/05
Long 02/22/05
Short 02/28/05
Long 03/01/05
Short 03/03/05
Long 03/04/05
Short 03/08/05
Long 03/16/05
Short 04/01/05
Long 04/05/05
Short 04/08/05
Long 04/12/05
Short 04/13/05
Long 04/14/05
Short 04/22/05
Long 04/25/05
Short 04/26/05
Long 05/03/05
Short 05/10/05
Long 05/11/05
Short 05/24/05
Long 05/25/05
Short 05/27/05
Long 05/31/05
Short 07/21/05
Long 07/25/05
Short 08/12/05
Long 08/15/05
Short 08/16/05
Long 08/24/05
Short 09/02/05
Long 09/06/05
Short 09/13/05
Long 09/16/05
Short 09/19/05
Long 09/21/05
Short 10/04/05
Long 10/06/05
Short 10/17/05
Long 10/19/05
Short 10/26/05
Long 10/31/05
Short 11/08/05
Long 11/10/05
Short 11/14/05
Long 11/15/05
Short 11/23/05
Open Long 11/28/05
Jared
jjames10@nc.rr.com
"Don't Panic!"
Join the InvestorsHub Community
Register for free to join our community of investors and share your ideas. You will also get access to streaming quotes, interactive charts, trades, portfolio, live options flow and more tools.