This Might Be Stupid???

Discussion in 'Strategy Development' started by wdbaker, Sep 23, 2002.

  1. wdbaker

    wdbaker

    All,
    I have built a system and would like to have you all review and try to improve it. First I will post the results and then if there is enough interest we can all work on it.

    It might be stupid to post what appears to be a good system here but looks can be deceiving, may be it is not as good as it appears.

    This was based on 1 1/2 years of 5min ES data, acct size 5000, 1 contract with margin set at 2500(yes I know that isn't correct, should be around $1700). System used to test was amibroker, sytem is not complicated so you should be able to easily convert to easy language, wealth builder, etc...

    Look forward to your questions
    Please be patient for answers as I may not be able to respond right away.

    wdbaker
     
  2. wdbaker

    wdbaker

    And no it does not reference any forward looking quotes.

    wdbaker
     
  3. wdbaker

    wdbaker

    And yes I included $30 per round for commission and slippage.

    I knew you would ask :D
    wdbaker
     
  4. Minime

    Minime

    Looks good. Are you going to publish the code?
     
  5. Reading that attachment is comparable to Neo trying to read The Matrix :eek:
     
  6. wdbaker

    wdbaker

    Hope this helps
    wdbaker

    EDIT: Sorry, had the wrong one, here is the right one

    EDIT: Ok well I guess it won't hold the tabs so you'll just have to read it the way it is

    wdbaker
     
  7. sherif24

    sherif24

    Well I for one would like to see it...hey if nothing else we can learn something new maybe. I'm not looking to bash anyone's systems, just to learn from them...
     
  8. wdbaker

    wdbaker

    See below, scroll down:D

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <HTML><HEAD><TITLE>AmiBroker System Test Report</TITLE>
    <META http-equiv=Content-Type content="text/html; charset=windows-1252">
    <STYLE>BODY {
    FONT-SIZE: 8pt; FONT-FAMILY: Tahoma,Arial,Helvetica,Sans Serif
    }
    TD {
    FONT-SIZE: 8pt; TEXT-ALIGN: right
    }
    TH {
    FONT-WEIGHT: normal; FONT-SIZE: 8pt; TEXT-ALIGN: left
    }
    .BIG {
    FONT-WEIGHT: bold; FONT-SIZE: 10pt; TEXT-ALIGN: center
    }
    </STYLE>

    <META content="MSHTML 6.00.2600.0" name=GENERATOR></HEAD>
    <BODY>
    <TABLE cellSpacing=2 width="100%">
    <TBODY>
    <TR bgColor=#cccccc>
    <TH class=BIG colSpan=5>Overall performance summary</TH></TR>
    <TR>
    <TH colSpan=5>&nbsp;</TH></TR>
    <TR>
    <TH>Total net profit:</TH>
    <TD>20617.50</TD>
    <TD>&nbsp;</TD>
    <TH>Total commissions paid:</TH>
    <TD>5370.00</TD></TR>
    <TR>
    <TH>Return on account:</TH>
    <TD>412.27 % </TD>
    <TD>&nbsp;</TD>
    <TH>Open position gain/loss</TH>
    <TD>0.00</TD></TR>
    <TR>
    <TH>Buy&amp;Hold profit:</TH>
    <TD>-17292.50</TD>
    <TD>&nbsp;</TD>
    <TH>Bars (avg. days) in test:</TH>
    <TD>32665 (553)</TD></TR>
    <TR>
    <TH>Buy&amp;Hold % return:</TH>
    <TD>-345.78%</TD>
    <TD>&nbsp;</TD>
    <TH>System to Buy&amp;Hold index:</TH>
    <TD>219.23%</TD></TR>
    <TR>
    <TH colSpan=5>&nbsp;</TH></TR>
    <TR>
    <TH>Annual system % return:</TD>
    <TD>193.96%</TD>
    <TD>&nbsp;</TD>
    <TH>Annual B&amp;H % return:</TH>
    <TD>N/A </TD></TR>
    <TR>
    <TH colSpan=5>&nbsp;</TH></TR>
    <TR>
    <TH>System drawdown:</TH>
    <TD>-137.50</TD>
    <TD>&nbsp;</TD>
    <TH>B&amp;H drawdown:</TH>
    <TD>-21362.50</TD></TR>
    <TR>
    <TH>Max. system drawdown:</TH>
    <TD>-5262.50</TD>
    <TD>&nbsp;</TD>
    <TH>B&amp;H max. drawdown:</TH>
    <TD>-23687.50</TD></TR>
    <TR>
    <TH>Max. system % drawdown:</TH>
    <TD>-28.70%</TD>
    <TD>&nbsp;</TD>
    <TH>B&amp;H max. % drawdown:</TH>
    <TD>-458.06%</TD></TR>
    <TR>
    <TH>Max. trade drawdown:</TH>
    <TD>-5262.50</TD>
    <TD>&nbsp;</TD>
    <TH>&nbsp;</TH>
    <TD>&nbsp;</TD></TR>
    <TR>
    <TH>Max. trade % drawdown:</TH>
    <TD>-28.70%</TD>
    <TD>&nbsp;</TD>
    <TH>&nbsp;</TH>
    <TD>&nbsp;</TD></TR>
    <TR>
    <TH>Trade drawdown:</TH>
    <TD>-2112.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>179</TD>
    <TD>&nbsp;</TD>
    <TH>Percent profitable:</TH>
    <TD>54.2%</TD></TR>
    <TR>
    <TH>Number winning trades:</TH>
    <TD>97</TD>
    <TD>&nbsp;</TD>
    <TH>Number losing trades:</TH>
    <TD>82</TD></TR>
    <TR>
    <TH>Profit of winners:</TH>
    <TD>43490.00</TD>
    <TD>&nbsp;</TD>
    <TH>Loss of losers:</TH>
    <TD>-22872.50</TD></TR>
    <TR>
    <TH>Total # of bars in winners:</TH>
    <TD>5076</TD>
    <TD>&nbsp;</TD>
    <TH>Total # of bars in losers:</TH>
    <TD>2419</TD></TR>
    <TR>
    <TH>Commissions paid in winners:</TH>
    <TD>2910.00</TD>
    <TD>&nbsp;</TD>
    <TH>Commissions paid in losers:</TH>
    <TD>2460.00</TD></TR>
    <TR>
    <TH colSpan=5>&nbsp;</TH></TR>
    <TR>
    <TH>Largest winning trade:</TH>
    <TD>1720.00</TD>
    <TD>&nbsp;</TD>
    <TH>Largest losing trade:</TH>
    <TD>-1017.50</TD></TR>
    <TR>
    <TH># of bars in largest winner:</TH>
    <TD>86</TD>
    <TD>&nbsp;</TD>
    <TH># bars in largest loser:</TH>
    <TD>20</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>448.35</TD>
    <TD>&nbsp;</TD>
    <TH>Average losing trade:</TH>
    <TD>-278.93</TD></TR>
    <TR>
    <TH>Avg. # of bars in winners:</TH>
    <TD>52.3</TD>
    <TD>&nbsp;</TD>
    <TH>Avg. # bars in losers:</TH>
    <TD>29.5</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>25170</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>22.9%</TD>
    <TD>&nbsp;</TD>
    <TH>Risk adjusted ann. return:</TH>
    <TD>845.34%</TD></TR>
    <TR>
    <TH>Ratio avg win/avg loss:</TH>
    <TD>1.61</TD>
    <TD>&nbsp;</TD>
    <TH>Avg. trade (win &amp; loss):</TH>
    <TD>115.18</TD></TR>
    <TR>
    <TH>Profit factor:</TH>
    <TD>1.90</TD>
    <TD>&nbsp;</TD>
    <TH></TH>
    <TD></TD></TR></TBODY></TABLE>
    <P>
    <P>
    <P></P></BODY></HTML>
     
  9. ctrader

    ctrader

    good results... so whats the strategy?
     
  10. The results look good, but to assess the expected future performance, we need to know HOW you created the system. You don't need to tell us the detailed rules, just your approach to creating those rules.

    <b>Do You have Future-Leakage?</b> You mention that the system does not use future quotes directly, but there are other forms of future-leakage that are all too easy to commit. For an ES trader, the more common forms of future-leakage arise from computing some average statistical result over the data that is then used to create the trading rule. A good example might be computing the average volatility over the backtesting period and using that volatility number to set trailing stop values, profit targets, etc. Because we don't want minor random price fluctuations to jiggle us out of trades too easily, we want to estimate the "normal" range of prices vs. an abnormal change in the trend.

    But this is an example of future leakage. At the start of the backtesting period (Dec 2000 in this example), we did not how volatile the ES would be in the coming 18 months. If we use data from Jan 2001 to help compute the average volatility for use in a trading rule that is executed in Dec 2000, we have a future leak. Any analysis that looks over the last 18 months of data (e.g., analyzing volatility, patterns, lengths of up and down trends, etc.) will constitute a future leak if the results of the analysis are used to set trading rules for backtesting.

    This phenomenon is extremely insidious for all trading system developers. It is almost impossible not to let one's knowledge of recent market behavior influence the trading rules that are then tested on price data that came before our most recent experience of the market. For example, we all know that the market has gone down over the last 2 years, so we think about testing a system that goes short. We backtest the shortselling system over data from those same last 2 years and come to the obvious conclusion that shortselling is the way to go. But we have a future-leak because we are using our knowledge of how things turned out (bear market) to go back and trade as if a bear market would occur. Its a classic future-leak. (BTW, I am not saying that I am bullish, only that the logic of developing a short-selling system after the market has gone down and testing on that data is epistemologically suspect)


    <b>Severity of Future-Leak: Speed of Change</b> Although it is hard to judge for sure, the severity of the future leak is a function of two issues. First is the stationarity of the statistical variable that you estimated from recent data and then used to influence past trades. If you can show and/or argue that the variable does not change much over long-term historical data, then you might be OK. Unfortunately, many statistical properties of price data fluctuate (e.g., volatility and average price movement both change over time). You have to ask yourself how quickly a key statistical property (like volatility) could change.

    <b>Severity of Future-Leak: Sensitivity to Change</b> Second, the sensitivity of the trading system to the parameter influences the severity of the future leak. For example, say one used the average volatility to set a trailing stop (too tight a trailing stop and profits are cut by the wiggles, too loose a trailing stop, and too much open profits are given back). What happens when future volatility is a little different from the past average that you future-leaked in the back-testing? Your previously optimized trailing stop will not be optimal and the system will have less profits than expected. How much less is the big question.

    <b>So.... HOW did you create your system?</b> I'm back to the original question of your thought processes in creating the system. Why did you chose the entry rules and exit rules that you chose? If knowledge of recent market behavior influenced your trading rules, you have a future leak.

    May future leaks be all in your past, :confused: :D
    Traden4Alpha
     
    #10     Sep 23, 2002