"Give your system a KISS" by Mark Seleznov

Discussion in 'Index Futures' started by wdbaker, Nov 24, 2002.

  1. wdbaker

    wdbaker

    All,
    Got the New Active Trader Mag and tested out this simple system on the e-mini, very impressed, the draw downs were a bit much for me but you can easily add to this system to lower them. Here is the system as I got it off of the activetrader.com site.

    Posting the link cause I'm sure they would appreciate the traffic and no I don't work for them:
    http://www.activetradermag.com/code.htm#dec02

    December 2002 Edition

    MetaStock code for "Give your system a KISS" by Mark Seleznov on p. 38.

    Enter long C>(Ref(HHV(H,1),-1)*(1.005))
    Close long C<(Ref(LLV(L,1),-1)*(1.005))
    Enter short C<(Ref(LLV(L,1),-1)*(1.005))
    Close short C>(Ref(HHV(H,1),-1)*(1.005))

    I don't have metastock so recoded it for amibroker

    Filter=TimeNum()>093400 AND TimeNum()<=155500;
    PositionSize=2500;

    Buy=Filter AND C>(Ref(HHV(H,1),-1)*(1.005)) ;
    Sell=C<(Ref(LLV(L,1),-1)*(1.005)) OR TimeNum()>155500;

    Short=Filter AND C<(Ref(LLV(L,1),-1)*(1.005));
    Cover=C>(Ref(HHV(H,1),-1)*(1.005))OR TimeNum()>155500;

    My code takes you out at the end of day, I don't like overnights
    I'll post some stats in a few

    I was hoping that since this code is freely available to the public that we could all work on it together to try and improve it, especially from the drawdown perspective.

    Lets have some fun with this :) :) :)
    wdbaker
     
  2. wdbaker

    wdbaker

    Here is the hourly bar results, all trades are 1 contract @2500 margin, $5000 in the account to start. When it talks about B&H it is comparing to Buy and Hold Strategy of the same.

    Scroll way down to see results
    <HEAD>
    <TITLE>AmiBroker System Test Report</TITLE><STYLE>
    <!--
    BODY { font-family:"Tahoma,Arial,Helvetica,Sans Serif"; font-size:8pt; }
    TD { font-size:8pt; text-align: right; }
    TH { font-size:8pt; text-align: left; font-weight:normal; }
    .BIG { font-size:10pt; font-weight:bold; text-align: center; }
    -->
    </STYLE></HEAD>
    <BODY>
    <TABLE CELLSPACING=2 WIDTH=100%>
    <TR bgcolor="#CCCCCC"><TH COLSPAN=5 class="BIG">Performance for ES1min </TH></TR>
    <TR><TH COLSPAN=5>&nbsp;</TH></TR>
    <TR><TH>Total net profit:</TH><TD>18662.50</TD><TD>&nbsp;</TD><TH>Total commissions paid:</TH><TD>5550.00</TD></TR>
    <TR><TH>Return on account:</TH><TD>373.25 %
    </TD><TD>&nbsp;</TD><TH>Open position gain/loss</TH><TD>0.00</TD></TR><TR><TH>Buy&Hold profit:</TH><TD>-15517.50</TD><TD>&nbsp;</TD><TH>Bars (days) in test:</TH><TD>1188 (216)</TD></TR>
    <TR><TH>Buy&Hold % return:</TH><TD>-310.35%</TD><TD>&nbsp;</TD><TH>System to Buy&Hold index:</TH><TD>220.27%</TD></TR>
    <TR><TH COLSPAN=5>&nbsp;</TH></TR>
    <TR><TH>Annual system % return:</TD><TD>1282.86%</TD><TD>&nbsp;</TD><TH>Annual B&H % return:</TH><TD> N/A </TD></TR>
    <TR><TH COLSPAN=5>&nbsp;</TH></TR>
    <TR><TH>System drawdown:</TH><TD>-1907.50</TD><TD>&nbsp;</TD><TH>B&H drawdown:</TH><TD>-18512.50</TD></TR>
    <TR><TH>Max. system drawdown:</TH><TD>-3707.50</TD><TD>&nbsp;</TD><TH>B&H max. drawdown:</TH><TD>-20262.50</TD></TR>
    <TR><TH>Max. system % drawdown:</TH><TD>-40.24%</TD><TD>&nbsp;</TD><TH>B&H max. % drawdown:</TH><TD>-393.21%</TD></TR>
    <TR><TH>Max. trade drawdown:</TH><TD>-2150.00</TD><TD>&nbsp;</TD><TH>&nbsp;</TH><TD>&nbsp;</TD></TR>
    <TR><TH>Max. trade % drawdown:</TH><TD>-21.05%</TD><TD>&nbsp;</TD><TH>&nbsp;</TH><TD>&nbsp;</TD></TR>
    <TR><TH>Trade drawdown:</TH><TD>-1375.00</TD><TD>&nbsp;</TD><TH>&nbsp;</TH><TD>&nbsp;</TD></TR>
    <TR><TH COLSPAN=5>&nbsp;</TH></TR>
    <TR><TH>Total number of trades:</TH><TD>185</TD><TD>&nbsp;</TD><TH>Percent profitable:</TH><TD>52.4%</TD></TR>
    <TR><TH>Number winning trades:</TH><TD>97</TD><TD>&nbsp;</TD><TH>Number losing trades:</TH><TD>88</TD></TR>
    <TR><TH>Profit of winners:</TH><TD>51152.50</TD><TD>&nbsp;</TD><TH>Loss of losers:</TH><TD>-32490.00</TD></TR>
    <TR><TH>Total # of bars in winners:</TH><TD>595</TD><TD>&nbsp;</TD><TH>Total # of bars in losers:</TH><TD>442</TD></TR>
    <TR><TH>Commissions paid in winners:</TH><TD>2910.00</TD><TD>&nbsp;</TD><TH>Commissions paid in losers:</TH><TD>2640.00</TD></TR>
    <TR><TH COLSPAN=5>&nbsp;</TH></TR>
    <TR><TH>Largest winning trade:</TH><TD>2507.50</TD><TD>&nbsp;</TD><TH>Largest losing trade:</TH><TD>-1255.00</TD></TR>
    <TR><TH># of bars in largest winner:</TH><TD>6</TD><TD>&nbsp;</TD><TH># bars in largest loser:</TH><TD>6</TD></TR>
    <TR><TH>Commission paid in largest winner:</TH><TD>30.00</TD><TD>&nbsp;</TD><TH>Commission paid in largest loser:</TH><TD>30.00</TD></TR>
    <TR><TH COLSPAN=5>&nbsp;</TH></TR>
    <TR><TH>Average winning trade:</TH><TD>527.35</TD><TD>&nbsp;</TD><TH>Average losing trade:</TH><TD>-369.20</TD></TR>
    <TR><TH>Avg. # of bars in winners:</TH><TD> 6.1</TD><TD>&nbsp;</TD><TH>Avg. # bars in losers:</TH><TD> 5.0</TD></TR>
    <TR><TH>Avg. commission paid in winner:</TH><TD>30.00</TD><TD>&nbsp;</TD><TH>Avg. commission paid in loser:</TH><TD>30.00</TD></TR>
    <TR><TH>Max consec. winners:</TH><TD>6</TD><TD>&nbsp;</TD><TH>Max consec. losers:</TH><TD>6</TD></TR>
    <TR><TH COLSPAN=5>&nbsp;</TH></TR>
    <TR><TH>Bars out of the market:</TH><TD>188</TD><TD>&nbsp;</TD><TH>Interest earned:</TH><TD>0.00</TD></TR>
    <TR><TH COLSPAN=5>&nbsp;</TH></TR>
    <TR><TH>Exposure:</TH><TD>84.2%</TD><TD>&nbsp;</TD><TH>Risk adjusted ann. return:</TH><TD>1524.04%</TD></TR>
    <TR><TH>Ratio avg win/avg loss:</TH><TD>1.43</TD><TD>&nbsp;</TD><TH>Avg. trade (win & loss):</TH><TD>100.88</TD></TR>
    <TR><TH>Profit factor:</TH><TD>1.57</TD><TD>&nbsp;</TD><TH></TH><TD></TD></TR></TABLE>
     
  3. wdbaker

    wdbaker

    Here are the results without my end of day restrictions

    These were all done on about 8 months of 1 min data for the es

    Scroll way down to see results:
    <HEAD>
    <TITLE>AmiBroker System Test Report</TITLE><STYLE>
    <!--
    BODY { font-family:"Tahoma,Arial,Helvetica,Sans Serif"; font-size:8pt; }
    TD { font-size:8pt; text-align: right; }
    TH { font-size:8pt; text-align: left; font-weight:normal; }
    .BIG { font-size:10pt; font-weight:bold; text-align: center; }
    -->
    </STYLE></HEAD>
    <BODY>
    <TABLE CELLSPACING=2 WIDTH=100%>
    <TR bgcolor="#CCCCCC"><TH COLSPAN=5 class="BIG">Performance for ES1min </TH></TR>
    <TR><TH COLSPAN=5>&nbsp;</TH></TR>
    <TR><TH>Total net profit:</TH><TD>26457.50</TD><TD>&nbsp;</TD><TH>Total commissions paid:</TH><TD>2040.00</TD></TR>
    <TR><TH>Return on account:</TH><TD>529.15 %
    </TD><TD>&nbsp;</TD><TH>Open position gain/loss</TH><TD>3657.50</TD></TR><TR><TH>Buy&Hold profit:</TH><TD>-15517.50</TD><TD>&nbsp;</TD><TH>Bars (days) in test:</TH><TD>1188 (216)</TD></TR>
    <TR><TH>Buy&Hold % return:</TH><TD>-310.35%</TD><TD>&nbsp;</TD><TH>System to Buy&Hold index:</TH><TD>270.50%</TD></TR>
    <TR><TH COLSPAN=5>&nbsp;</TH></TR>
    <TR><TH>Annual system % return:</TD><TD>2137.42%</TD><TD>&nbsp;</TD><TH>Annual B&H % return:</TH><TD> N/A </TD></TR>
    <TR><TH COLSPAN=5>&nbsp;</TH></TR>
    <TR><TH>System drawdown:</TH><TD>-2660.00</TD><TD>&nbsp;</TD><TH>B&H drawdown:</TH><TD>-18512.50</TD></TR>
    <TR><TH>Max. system drawdown:</TH><TD>-4672.50</TD><TD>&nbsp;</TD><TH>B&H max. drawdown:</TH><TD>-20262.50</TD></TR>
    <TR><TH>Max. system % drawdown:</TH><TD>-54.78%</TD><TD>&nbsp;</TD><TH>B&H max. % drawdown:</TH><TD>-393.21%</TD></TR>
    <TR><TH>Max. trade drawdown:</TH><TD>-2237.50</TD><TD>&nbsp;</TD><TH>&nbsp;</TH><TD>&nbsp;</TD></TR>
    <TR><TH>Max. trade % drawdown:</TH><TD>-40.59%</TD><TD>&nbsp;</TD><TH>&nbsp;</TH><TD>&nbsp;</TD></TR>
    <TR><TH>Trade drawdown:</TH><TD>-1762.50</TD><TD>&nbsp;</TD><TH>&nbsp;</TH><TD>&nbsp;</TD></TR>
    <TR><TH COLSPAN=5>&nbsp;</TH></TR>
    <TR><TH>Total number of trades:</TH><TD>68</TD><TD>&nbsp;</TD><TH>Percent profitable:</TH><TD>54.4%</TD></TR>
    <TR><TH>Number winning trades:</TH><TD>37</TD><TD>&nbsp;</TD><TH>Number losing trades:</TH><TD>31</TD></TR>
    <TR><TH>Profit of winners:</TH><TD>40115.00</TD><TD>&nbsp;</TD><TH>Loss of losers:</TH><TD>-17330.00</TD></TR>
    <TR><TH>Total # of bars in winners:</TH><TD>1019</TD><TD>&nbsp;</TD><TH>Total # of bars in losers:</TH><TD>212</TD></TR>
    <TR><TH>Commissions paid in winners:</TH><TD>1110.00</TD><TD>&nbsp;</TD><TH>Commissions paid in losers:</TH><TD>930.00</TD></TR>
    <TR><TH COLSPAN=5>&nbsp;</TH></TR>
    <TR><TH>Largest winning trade:</TH><TD>3832.50</TD><TD>&nbsp;</TD><TH>Largest losing trade:</TH><TD>-1767.50</TD></TR>
    <TR><TH># of bars in largest winner:</TH><TD>152</TD><TD>&nbsp;</TD><TH># bars in largest loser:</TH><TD>16</TD></TR>
    <TR><TH>Commission paid in largest winner:</TH><TD>30.00</TD><TD>&nbsp;</TD><TH>Commission paid in largest loser:</TH><TD>30.00</TD></TR>
    <TR><TH COLSPAN=5>&nbsp;</TH></TR>
    <TR><TH>Average winning trade:</TH><TD>1084.19</TD><TD>&nbsp;</TD><TH>Average losing trade:</TH><TD>-559.03</TD></TR>
    <TR><TH>Avg. # of bars in winners:</TH><TD> 27.5</TD><TD>&nbsp;</TD><TH>Avg. # bars in losers:</TH><TD> 6.8</TD></TR>
    <TR><TH>Avg. commission paid in winner:</TH><TD>30.00</TD><TD>&nbsp;</TD><TH>Avg. commission paid in loser:</TH><TD>30.00</TD></TR>
    <TR><TH>Max consec. winners:</TH><TD>10</TD><TD>&nbsp;</TD><TH>Max consec. losers:</TH><TD>4</TD></TR>
    <TR><TH COLSPAN=5>&nbsp;</TH></TR>
    <TR><TH>Bars out of the market:</TH><TD>1</TD><TD>&nbsp;</TD><TH>Interest earned:</TH><TD>0.00</TD></TR>
    <TR><TH COLSPAN=5>&nbsp;</TH></TR>
    <TR><TH>Exposure:</TH><TD>99.9%</TD><TD>&nbsp;</TD><TH>Risk adjusted ann. return:</TH><TD>2139.22%</TD></TR>
    <TR><TH>Ratio avg win/avg loss:</TH><TD>1.94</TD><TD>&nbsp;</TD><TH>Avg. trade (win & loss):</TH><TD>335.07</TD></TR>
    <TR><TH>Profit factor:</TH><TD>2.31</TD><TD>&nbsp;</TD><TH></TH><TD></TD></TR></TABLE>
     
  4. ddefina

    ddefina

    That's pretty much a stock system I used for years with good success. It works best with volatility and range expansion, but over a period of time, both of these usually occur to give an overall profit. I liked it with stocks because you could apply it to a whole portfolio and have lower drawdowns with a smoother equity curve. Things aren't as glamorous these days, but I'm sure it would still work. With the indexes it can have poor results during consolidation periods, and kick rear during breakouts. I always used it overnight though, otherwise you miss chunks of big moves. You should test it both ways, and do it on the actual futures contracts, not the indexes.
     
  5. You may want to filter the lunchtime period to see if the strike rate improves.

    Runningbear
     
  6. Ryon

    Ryon Guest

    would anyone care to post an easylanguage code for this system? I'm an absolute moron when it comes to coding this stuff and it would save me about 2 weeks of headaches....:)

    thanks in advance.
     
  7. CWU

    CWU

    I've ran end of day backtests similar to this. I've found they need a few more filters to be profitable. This backtest was just 100 days. I could run it 500, 1000 or 5000 and it's not going to make money as is.
     
  8. wdbaker

    wdbaker

    opmtrader brings up a valid point, shouldn't the LLV be multiplied by .995 instead of 1.005, thereby creating a buffer above the hhv and below the LLV. So the code would look like this then:

    Filter=TimeNum()>093400 AND TimeNum()<=155500;
    PositionSize=2500;

    Buy=Filter AND C>(Ref(HHV(H,1),-1)*(1.005)) ;
    Sell=C<(Ref(LLV(L,1),-1)*(.995)) OR TimeNum()>155500;

    Short=Filter AND C<(Ref(LLV(L,1),-1)*(.995));
    Cover=C>(Ref(HHV(H,1),-1)*(1.005))OR TimeNum()>155500;

    both the website and the mag have it the other way so not sure which is right, the original way would definitely skew things in favor of going short and beings how we have been in a bear market for a while would possibly make the #'s look better, don't know if this was intentional or not???

    Here is what the #'s look like with the new modification, definitely less then before but still respectable:

    Scroll way down to see the results

    wdbaker
    <HEAD>
    <TITLE>AmiBroker System Test Report</TITLE><STYLE>
    <!--
    BODY { font-family:"Tahoma,Arial,Helvetica,Sans Serif"; font-size:8pt; }
    TD { font-size:8pt; text-align: right; }
    TH { font-size:8pt; text-align: left; font-weight:normal; }
    .BIG { font-size:10pt; font-weight:bold; text-align: center; }
    -->
    </STYLE></HEAD>
    <BODY>
    <TABLE CELLSPACING=2 WIDTH=100%>
    <TR bgcolor="#CCCCCC"><TH COLSPAN=5 class="BIG">Performance for ES1min </TH></TR>
    <TR><TH COLSPAN=5> </TH></TR>
    <TR><TH>Total net profit:</TH><TD>8307.50</TD><TD> </TD><TH>Total commissions paid:</TH><TD>2280.00</TD></TR>
    <TR><TH>Return on account:</TH><TD>166.15 %
    </TD><TD> </TD><TH>Open position gain/loss</TH><TD>0.00</TD></TR><TR><TH>Buy&Hold profit:</TH><TD>-15517.50</TD><TD> </TD><TH>Bars (days) in test:</TH><TD>1188 (216)</TD></TR>
    <TR><TH>Buy&Hold % return:</TH><TD>-310.35%</TD><TD> </TD><TH>System to Buy&Hold index:</TH><TD>153.54%</TD></TR>
    <TR><TH COLSPAN=5> </TH></TR>
    <TR><TH>Annual system % return:</TD><TD>422.86%</TD><TD> </TD><TH>Annual B&H % return:</TH><TD> N/A </TD></TR>
    <TR><TH COLSPAN=5> </TH></TR>
    <TR><TH>System drawdown:</TH><TD>-550.00</TD><TD> </TD><TH>B&H drawdown:</TH><TD>-18512.50</TD></TR>
    <TR><TH>Max. system drawdown:</TH><TD>-4165.00</TD><TD> </TD><TH>B&H max. drawdown:</TH><TD>-20262.50</TD></TR>
    <TR><TH>Max. system % drawdown:</TH><TD>-32.80%</TD><TD> </TD><TH>B&H max. % drawdown:</TH><TD>-393.21%</TD></TR>
    <TR><TH>Max. trade drawdown:</TH><TD>-2150.00</TD><TD> </TD><TH> </TH><TD> </TD></TR>
    <TR><TH>Max. trade % drawdown:</TH><TD>-21.01%</TD><TD> </TD><TH> </TH><TD> </TD></TR>
    <TR><TH>Trade drawdown:</TH><TD>-1375.00</TD><TD> </TD><TH> </TH><TD> </TD></TR>
    <TR><TH COLSPAN=5> </TH></TR>
    <TR><TH>Total number of trades:</TH><TD>76</TD><TD> </TD><TH>Percent profitable:</TH><TD>55.3%</TD></TR>
    <TR><TH>Number winning trades:</TH><TD>42</TD><TD> </TD><TH>Number losing trades:</TH><TD>34</TD></TR>
    <TR><TH>Profit of winners:</TH><TD>24415.00</TD><TD> </TD><TH>Loss of losers:</TH><TD>-16107.50</TD></TR>
    <TR><TH>Total # of bars in winners:</TH><TD>243</TD><TD> </TD><TH>Total # of bars in losers:</TH><TD>161</TD></TR>
    <TR><TH>Commissions paid in winners:</TH><TD>1260.00</TD><TD> </TD><TH>Commissions paid in losers:</TH><TD>1020.00</TD></TR>
    <TR><TH COLSPAN=5> </TH></TR>
    <TR><TH>Largest winning trade:</TH><TD>2507.50</TD><TD> </TD><TH>Largest losing trade:</TH><TD>-1255.00</TD></TR>
    <TR><TH># of bars in largest winner:</TH><TD>6</TD><TD> </TD><TH># bars in largest loser:</TH><TD>6</TD></TR>
    <TR><TH>Commission paid in largest winner:</TH><TD>30.00</TD><TD> </TD><TH>Commission paid in largest loser:</TH><TD>30.00</TD></TR>
    <TR><TH COLSPAN=5> </TH></TR>
    <TR><TH>Average winning trade:</TH><TD>581.31</TD><TD> </TD><TH>Average losing trade:</TH><TD>-473.75</TD></TR>
    <TR><TH>Avg. # of bars in winners:</TH><TD> 5.8</TD><TD> </TD><TH>Avg. # bars in losers:</TH><TD> 4.7</TD></TR>
    <TR><TH>Avg. commission paid in winner:</TH><TD>30.00</TD><TD> </TD><TH>Avg. commission paid in loser:</TH><TD>30.00</TD></TR>
    <TR><TH>Max consec. winners:</TH><TD>6</TD><TD> </TD><TH>Max consec. losers:</TH><TD>4</TD></TR>
    <TR><TH COLSPAN=5> </TH></TR>
    <TR><TH>Bars out of the market:</TH><TD>793</TD><TD> </TD><TH>Interest earned:</TH><TD>0.00</TD></TR>
    <TR><TH COLSPAN=5> </TH></TR>
    <TR><TH>Exposure:</TH><TD>33.2%</TD><TD> </TD><TH>Risk adjusted ann. return:</TH><TD>1271.79%</TD></TR>
    <TR><TH>Ratio avg win/avg loss:</TH><TD>1.23</TD><TD> </TD><TH>Avg. trade (win & loss):</TH><TD>109.31</TD></TR>
    <TR><TH>Profit factor:</TH><TD>1.52</TD><TD> </TD><TH></TH><TD></TD></TR></TABLE>
     
  9. Bob111

    Bob111

    wdbaker-when you start trade, unstead posting different system codes or results?
    i remember, your posts about your another super profitable system about 2-3 month ago.......did you make any money on it?
    there is a problem, when people, who come on market to trade, never even try it, because they fell into system creating proccess...they trying to find (or create) super super profitable system ,where they cannot have any losses)))) and of course it will take forever))))))
     
  10. wdbaker

    wdbaker

    Bob111,
    Coming soon to a forum near you, just got IB account set up, wired the money late friday, got e-sig downloaded today, probably sometime around the first of the month will go live. I know you don't think that I went out and learned code and worked on systems just to get brain damaged.

    All in due time, my time not yours :D :D
    wdbaker
     
    #10     Nov 25, 2002