[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [amibroker] StoRSI



PureBytes Links

Trading Reference Links

Same system used for ^NDX100, All parameters the same except Maximum
Stop loss set at 25% and exit at stop.

Range= 1/01/97 to 7/21/2002

returns= +312.52%
trades=75...50profit / 25 loss==66.7%

Anthony



dingo wrote:

> Herman,
>
> I haven't yet had an opportunity to expolore the 3d charting concept
> but
> it sure sounds like a great way to evaluate for over optimization.
> Personally, I haven't thought designing a system would be easy - I'm
> too
> darned old for that! And I think the idea of having a written plan is
> excellent - one that I plan to do.
>
> Since we've been discussing the development of a system for QQQ and it
>
> has a limited history (although NDX has been around longer and might
> be
> and acceptable proxy) it complicates things - yes/no? With the wild
> gyrations of the markets over the last 5 years don't you think you
> ought
> to include the years 1997 thru 2002 to make sure the system has
> exposure
> to those events? Be assured that I agree with your premises about
> sample testing.. I have a feeling that Steve's chart that started
> this
> latest round of discussions was optimized using dates beginning with
> 1/1/2000 to current which is highly optimized for a bear market. For
> intstance start the backtest on 1/1/1998 and see what happens. That
> worries me. How would you address this?
>
> Thanks!
>
> dingo
>
>
>
> -----Original Message-----
> From: Herman van den Bergen [mailto:psytek@x...]
> Sent: Sunday, July 21, 2002 12:17 PM
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: RE: [amibroker] StoRSI
>
>
> Hi dingo,
>
> There are two simple ways to verify that you did not over-optimize
> your
> system:
>
> 1) I always chart each parameter I optimize to see if the parameter
> has
> a
> pattern, ie changes in some predictable fashion wrt another parameter
> (don't
> only plot parameters vs equity, analyze relationships between other
> parameters as well). If I can i will plot two optimized parameters at
> the
> same time on a 3D plot. If I optimize 3 parameters I make one 3D chart
>
> for
> each value of the parameter with the smallest range - yes you get
> dozens
> of
> charts but you may start to see very interesting patterns! If you get
> lots
> of random peaks and you cannot see any kind of normal distribution you
>
> have
> probably over-optimized. Too many people think designing a trading
> system is
> simple...you should document it like a business plan - after all you
> will
> risk similar sums of money with it.
>
> 2) I always reserve a fair bit of data for out of sample testing. I
> develop
> may systems on data before 1/1/01 and test it out of sample on data
> after
> that date. I never adjust parameters to make it perform better in the
> OOS
> data. If it doesn't work i start from scratch, something i have done
> hundreds of not thousands, of times. Ideally your equity curve
> shouldn't
> show a ripple when you change data.
>
> Not everybody believes in these two approaches because they think or
> assume
> it is impossible to get "perfect" out-of-sample performance for
> systems
> developed on data from 2-10 years ago. But it is possible, for the QQQ
>
> and
> for many other stocks.
>
> Good luck,
> Herman.
>
>
>
> -----Original Message-----
> From: dingo [mailto:dingo@x...]
> Sent: Sunday, July 21, 2002 11:39 AM
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: RE: [amibroker] StoRSI
>
>
> Hi WJ,
>
> >From all of my reading on this list it seems that every time on
> ventures
> off and starts optimizing every parameter in the foundation of a
> formula
> that the dreadful "over optimization" term starts rearing its ugly
> head.
> \
>
> I'm far from an expert and am still a little confilicted on it. I can
> understand the desire to have a "robust" solution for a basket of
> stocks
> but I can't help but think that if you want to develop a tailored
> solution for a very high profile vehicle like qqq it should be more
> than
> ok.
>
> dingo
>
>
> Yahoo! Groups Sponsor
ADVERTISEMENT

>
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

Title: AmiBroker System Test Report






Settings

 

Initial Equity:
10000

Periodicity/Positions:
Daily/Long Short

Commissions:
0.50 %

Annual interest rate:
0.00%

Range:
1/1/1997 - 7/21/2002

Apply to:
Current Symbol

Long trades

Buy price:
Open

Sell price:
Open

Buy delay:
1

Sell delay:
1

Short trades

Short price:
Open

Cover price:
Open

Short delay:
1

Cover delay:
1

Stops

Maximum loss:
percent

Profit target:
disabled

Value:
25.00

Value:
50.00

Exit at stop?
yes

Exit at stop?
no

 

Trailing stop:
disabled

 
 

Value:
50.00

 
 

Exit at stop?
yes

 
 




Formula//StochRSI on the QQQ's 

StochRsi=EMA((RSI(8)-LLV(RSI(8),8))/(HHV(RSI(8),8)-LLV(RSI(8),8)),3)*100; 



Buy=Cross(17,StochRsi) AND ADX(14) > 20 AND RSI(4)<50; 
Sell=Cross(StochRsi,83)AND ADX(14) > 13 AND RSI(4)>50; 
Short=Sell;Cover=Buy; 
Filter=1; 
AddColumn(Buy,"buy"); 
Plot(Stochrsi,"",4,1); 
Plot(17,"",5,1); 
Plot(83,"",5,1);




Overall performance summary

 

Total net profit:
31252.28
 
Total commissions paid:
9865.88

Return on account:
312.52 % 
 
Open position gain/loss
1580.02

Buy&Hold profit:
1761.93
 
Bars (avg. days) in test:
1395 (2025)

Buy&Hold % return:
17.62%
 
System to Buy&Hold index:
1673.75%

 

Annual system % return:
29.10%
 
Annual B&H % return:
2.97%

 

System drawdown:
-5744.49
 
B&H drawdown:
-513.66

Max. system drawdown:
-9074.01
 
B&H max. drawdown:
-47123.07

Max. system % drawdown:
-68.75%
 
B&H max. % drawdown:
-80.36%

Max. trade drawdown:
-8545.46
 
 
 

Max. trade % drawdown:
-53.19%
 
 
 

Trade drawdown:
-5756.92
 
 
 

 

Total number of trades:
75
 
Percent profitable:
66.7%

Number winning trades:
50
 
Number losing trades:
25

Profit of winners:
50654.36
 
Loss of losers:
-20982.10

Total # of bars in winners:
682
 
Total # of bars in losers:
766

Commissions paid in winners:
6842.49
 
Commissions paid in losers:
3023.39

 

Largest winning trade:
5355.22
 
Largest losing trade:
-3227.82

# of bars in largest winner:
20
 
# bars in largest loser:
26

Commission paid in largest winner:
404.25
 
Commission paid in largest loser:
414.94

 

Average winning trade:
1013.09
 
Average losing trade:
-839.28

Avg. # of bars in winners:
13.6
 
Avg. # bars in losers:
30.6

Avg. commission paid in winner:
136.85
 
Avg. commission paid in loser:
120.94

Max consec. winners:
9
 
Max consec. losers:
3

 

Bars out of the market:
18
 
Interest earned:
0.00

 

Exposure:
98.7%
 
Risk adjusted ann. return:
29.48%

Ratio avg win/avg loss:
1.21
 
Avg. trade (win & loss):
395.63

Profit factor:
2.41
 







Performance for ^NDX 

 

Total net profit:
31252.28
 
Total commissions paid:
9865.88

Return on account:
312.52 % 
 
Open position gain/loss
1580.02

Buy&Hold profit:
1761.93
 
Bars (days) in test:
1395 (2025)

Buy&Hold % return:
17.62%
 
System to Buy&Hold index:
1673.75%

 

Annual system % return:
29.10%
 
Annual B&H % return:
2.97%

 

System drawdown:
-5744.49
 
B&H drawdown:
-513.66

Max. system drawdown:
-9074.01
 
B&H max. drawdown:
-47123.07

Max. system % drawdown:
-68.75%
 
B&H max. % drawdown:
-80.36%

Max. trade drawdown:
-8545.46
 
 
 

Max. trade % drawdown:
-53.19%
 
 
 

Trade drawdown:
-5756.92
 
 
 

 

Total number of trades:
75
 
Percent profitable:
66.7%

Number winning trades:
50
 
Number losing trades:
25

Profit of winners:
50654.36
 
Loss of losers:
-20982.10

Total # of bars in winners:
682
 
Total # of bars in losers:
766

Commissions paid in winners:
6842.49
 
Commissions paid in losers:
3023.39

 

Largest winning trade:
5355.22
 
Largest losing trade:
-3227.82

# of bars in largest winner:
20
 
# bars in largest loser:
26

Commission paid in largest winner:
404.25
 
Commission paid in largest loser:
414.94

 

Average winning trade:
1013.09
 
Average losing trade:
-839.28

Avg. # of bars in winners:
13.6
 
Avg. # bars in losers:
30.6

Avg. commission paid in winner:
136.85
 
Avg. commission paid in loser:
120.94

Max consec. winners:
9
 
Max consec. losers:
3

 

Bars out of the market:
18
 
Interest earned:
0.00

 

Exposure:
98.7%
 
Risk adjusted ann. return:
29.48%

Ratio avg win/avg loss:
1.21
 
Avg. trade (win & loss):
395.63

Profit factor:
2.41
 







Trade list for ^NDX 

Trade
Entry date
Entry price
Exit date
Exit price
Position size
Net Profit
Equity value

Out
1/2/1997
821.36
1/3/1997
815.60
0.00
0.00
10000.00

Long
1/3/1997
815.60
1/8/1997
864.55
10000.00
497.17
10497.17

Short
1/8/1997
864.55
1/29/1997
890.79
10497.17
-421.98
10075.19

Long
1/29/1997
890.79
4/8/1997
832.31
10075.19
-758.88
9316.32

Short
4/8/1997
832.31
5/14/1997
910.57
9316.32
-964.77
8351.54

Long
5/14/1997
910.57
5/27/1997
959.08
8351.54
359.18
8710.73

Short
5/27/1997
959.08
6/4/1997
929.81
8710.73
177.40
8888.13

Long
6/4/1997
929.81
6/16/1997
964.40
8888.13
240.11
9128.24

Short
6/16/1997
964.40
7/29/1997
1075.18
9128.24
-1134.60
7993.65

Long
7/29/1997
1075.18
8/4/1997
1108.95
7993.65
169.88
8163.53

Short
8/4/1997
1108.95
8/13/1997
1090.78
8163.53
51.45
8214.98

Long
8/13/1997
1090.78
9/5/1997
1105.82
8214.98
30.55
8245.53

Short
9/5/1997
1105.82
10/28/1997
978.84
8245.53
859.63
9105.17

Long
10/28/1997
978.84
11/4/1997
1050.72
9105.17
574.23
9679.40

Short
11/4/1997
1050.72
11/13/1997
980.14
9679.40
550.15
10229.55

Long
11/13/1997
980.14
11/18/1997
1049.70
10229.55
620.06
10849.61

Short
11/18/1997
1049.70
12/26/1997
938.99
10849.61
1030.07
11879.68

Long
12/26/1997
938.99
12/31/1997
998.46
11879.68
629.83
12509.51

Short
12/31/1997
998.46
3/4/1998
1175.72
12509.51
-2334.85
10174.66

Long
3/4/1998
1175.72
3/17/1998
1180.17
10174.66
-63.43
10111.24

Short
3/17/1998
1180.17
4/28/1998
1220.05
10111.24
-441.08
9670.16

Long
4/28/1998
1220.05
5/14/1998
1263.08
9670.16
242.65
9912.81

Short
5/14/1998
1263.08
7/24/1998
1405.80
9912.81
-1213.61
8699.19

Long
7/24/1998
1405.80
8/19/1998
1401.24
8699.19
-115.07
8584.12

Short
8/19/1998
1401.24
8/31/1998
1265.04
8584.12
744.36
9328.48

Long
8/31/1998
1265.04
9/14/1998
1290.20
9328.48
91.32
9419.80

Short (max loss)
9/14/1998
1290.20
11/27/1998
1612.75
9419.80
-2437.37
6982.43

Out
11/27/1998
1612.75
12/22/1998
1787.30
0.00
0.00
6982.43

Short
12/22/1998
1787.30
1/15/1999
1906.12
6982.43
-531.70
6450.73

Long
1/15/1999
1906.12
2/1/1999
2127.19
6450.73
679.90
7130.63

Short
2/1/1999
2127.19
2/8/1999
1988.55
7130.63
391.11
7521.74

Long
2/8/1999
1988.55
3/10/1999
2028.57
7521.74
75.40
7597.15

Short
3/10/1999
2028.57
7/23/1999
2281.92
7597.15
-1020.04
6577.10

Long
7/23/1999
2281.92
8/17/1999
2313.08
6577.10
23.59
6600.70

Short (max loss)
8/17/1999
2313.08
11/15/1999
2891.58
6600.70
-1708.58
4892.11

Out
11/15/1999
2891.58
11/17/1999
2952.91
0.00
0.00
4892.11

Short
11/17/1999
2952.91
12/1/1999
2970.04
4892.11
-77.16
4814.95

Long
12/1/1999
2970.04
12/14/1999
3243.60
4814.95
393.12
5208.08

Short
12/14/1999
3243.60
1/7/2000
3337.26
5208.08
-201.71
5006.36

Long
1/7/2000
3337.26
1/19/2000
3741.45
5006.36
553.25
5559.61

Short
1/19/2000
3741.45
1/28/2000
3595.89
5559.61
159.62
5719.23

Long
1/28/2000
3595.89
2/4/2000
3858.60
5719.23
358.56
6077.78

Short
2/4/2000
3858.60
2/23/2000
3966.00
6077.78
-229.10
5848.68

Long
2/23/2000
3966.00
3/2/2000
4311.97
5848.68
449.17
6297.85

Short
3/2/2000
4311.97
4/13/2000
3645.79
6297.85
905.15
7202.99

Long
4/13/2000
3645.79
6/2/2000
3518.98
7202.99
-321.32
6881.68

Short
6/2/2000
3518.98
9/19/2000
3588.37
6881.68
-203.84
6677.84

Long
9/19/2000
3588.37
10/20/2000
3379.73
6677.84
-453.11
6224.73

Short
10/20/2000
3379.73
10/31/2000
3120.21
6224.73
413.34
6638.07

Long
10/31/2000
3120.21
11/6/2000
3346.15
6638.07
411.89
7049.97

Short
11/6/2000
3346.15
11/13/2000
2798.95
7049.97
1076.63
8126.59

Long
11/13/2000
2798.95
12/11/2000
2900.28
8126.59
211.47
8338.06

Short
12/11/2000
2900.28
12/18/2000
2604.08
8338.06
763.91
9101.97

Long
12/18/2000
2604.08
12/28/2000
2435.84
9101.97
-676.12
8425.85

Short
12/28/2000
2435.84
3/1/2001
1879.84
8425.85
1829.39
10255.24

Long
3/1/2001
1879.84
3/8/2001
1982.44
10255.24
454.37
10709.61

Short
3/8/2001
1982.44
4/3/2001
1487.87
10709.61
2551.33
13260.94

Long
4/3/2001
1487.87
4/11/2001
1694.60
13260.94
1700.70
14961.64

Short
4/11/2001
1694.60
4/27/2001
1808.92
14961.64
-1153.90
13807.74

Long
4/27/2001
1808.92
5/21/2001
1931.29
13807.74
791.32
14599.06

Short
5/21/2001
1931.29
8/22/2001
1504.65
14599.06
3062.95
17662.01

Long
8/22/2001
1504.65
8/28/2001
1579.55
17662.01
698.18
18360.19

Short
8/28/2001
1579.55
9/5/2001
1425.35
18360.19
1599.81
19960.00

Long
9/5/2001
1425.35
11/8/2001
1548.00
19960.00
1509.35
21469.35

Short
11/8/2001
1548.00
12/4/2001
1582.07
21469.35
-684.85
20784.50

Long
12/4/2001
1582.07
12/7/2001
1706.27
20784.50
1415.68
22200.18

Short
12/7/2001
1706.27
12/17/2001
1607.08
22200.18
1062.10
23262.28

Long
12/17/2001
1607.08
1/4/2002
1685.54
23262.28
897.40
24159.68

Short
1/4/2002
1685.54
2/6/2002
1480.45
24159.68
2683.36
26843.04

Long
2/6/2002
1480.45
2/14/2002
1491.19
26843.04
-74.67
26768.37

Short
2/14/2002
1491.19
2/25/2002
1366.44
26768.37
1960.51
28728.88

Long
2/25/2002
1366.44
3/5/2002
1484.83
28728.88
2189.37
30918.25

Short
3/5/2002
1484.83
4/12/2002
1340.66
30918.25
2677.82
33596.07

Long
4/12/2002
1340.66
4/17/2002
1422.42
33596.07
1702.65
35298.72

Short
4/17/2002
1422.42
4/25/2002
1295.59
35298.72
2778.69
38077.41

Long
4/25/2002
1295.59
5/15/2002
1290.40
38077.41
-532.54
37544.86

Short
5/15/2002
1290.40
6/12/2002
1092.45
37544.86
5355.22
42900.08

Long
6/12/2002
1092.45
7/18/2002
1020.82
42900.08
-3227.82
39672.26

Open Short
7/18/2002
1020.82
7/19/2002
975.06
39672.26
1580.02
41252.28