Damn you, out of sample trades!

Discussion in 'Strategy Building' started by logic_man, Aug 22, 2012.

  1. No trouble at all. Pretty much any system with small profit targets and wide stops - sound familiar? :) - will score very high win rates with randomized entry points. This is true for both long and short positions. The entries can be randomized in pretty much any conceivable way - random price offsets from baseline, random time offset from open, combinations thereof, etc etc etc.

    This has been demonstrated right here on ET multiple times over the years. It appears you are re-demonstrating it for us, too, which I'm sure will be appreciated by a segment of the readership.
     
    #21     Aug 22, 2012
  2. No, peak P&L was only about 1/6 as large as the backtest. But, I would have to look at the profit targets in the backtest vs. live. The profit target algorithm may have been setting the targets closer on these live trades due to the market action, which would make for smaller wins.

    The deepest drawdown in the backtest was a 17 trade drawdown of ~$1500/contract, so this is still smaller than that.

    Since this piggybacks off of my main system, all of the backtesting is done on actual trades or trades I have not taken but recorded in my database, so the data is accurate. I just try to find good trade-offs in terms of the ranges of parameter values for the data I collect, as objectively as possible. For example, out of the 20 trades that had the highest possible profit potential, 40% of them were rejected from the backtest on the basis of other parameters where they would have failed to meet the criteria for a valid trigger. Of those 8 trades, 4 would have been losers for this other "scalping" system as well, so there is definitely overlap in the filtering mechanism, which is unsurprising since the entry algorithm is the same. So, when I take those 8 trades and filter them out of the backtest, that seems legitimate to me since I would never have taken them regardless. Despite what Random Capital is implying, I am concerned about curve-fitting every step of the way.

    What actually surprised me in the backtest was that there were some filtered trades which had positive expectancy when the profit target algorithm was applied to them, since the profit target version doesn't require a sustained intraday/overnight trend, as the base system does. This has enabled me to use some of my filtered trades as actual trades for the first time, which, if it can be sustained, will be great. The ES has been great in this respect, since I have not had a "swing" trade trigger on the ES over the past week, but have had 7 "profit target" trades trigger for 7 wins. By decoupling the "profit target" component of the trade from the "swing" component of the trade, I've created a ton of new opportunities, as well as added an additional layer of confirmation between the two trade components, which has been keeping me out of bad "swing" trades as well (that's a different thing, not having to do with this).

    Average time in the trades are about 3 hours, ranging from 0 minutes to 1200 minutes, with 60% of trades done within 10 minutes. So, when it works right and the profit target is met within minutes, I suppose that's when it's closer to scalping, since the average profit target is less than 0.1% away from the entry.
     
    #22     Aug 22, 2012
  3. Yep, coupled with your (relatively) wide stop, this will indeed generate very high hit rates with random entries.
     
    #23     Aug 22, 2012
  4. Yeah, but as I mentioned, the profit targets can be fairly far away, so it's not as if I'm grabbing a tick or two. Average ES target is 0.19% (range of 0.04% to 0.43%), average Crude is 0.28% (range of 0.03% to 1.0%) and average Euro is 0.16% (range of 0.015% to 1.104%).

    If you want to show me random entry systems with profit targets that far away, with similar ranges in profit targets, on instruments with volatility similar to each of those, in which 60% of trades reach the target within 10 minutes, please feel free.

    Making general statements about some curve-fitted systems you've seen in the past without making any acknowledgement of the details of this specific system seems like a way of arguing past the data. I'm not sure why you would find it necessary to do that, frankly.
     
    #24     Aug 22, 2012
  5. Yeah, I'm not going to set a profit target hundreds of ticks away for this system. Capturing those bigger moves is what the main system, which does not use profit targets at all, is for. This is designed to be incremental to that system.

    And, as I put in the other response, that is an average but the range on either side of that average is fairly wide (again, for the timeframe of minutes we are generally discussing).
     
    #25     Aug 22, 2012
  6. I have a better idea - since this is your system, how about you do the leg work? :)

    Good luck.
     
    #26     Aug 22, 2012
  7. Right, but apparently the only thing I'm good at is curve-fitting. :(
     
    #27     Aug 22, 2012
  8. dom993

    dom993

    I bought a few weeks ago a "30 year-symbol" pack from TickData, which for a reasonable price gave me 9 years of the best historical data for CL / ES / 6E + 3 years for GC ... I would suggest you get down this path, and backtest your systems on much longer periods than 6 months to 1 year.

    The problem with avg-risk >> avg-reward is exactly what you are experiencing ... at some point you hit a string a losers which sets you far back.

    I have a very simple test that I use to assess if something has a directional edge ... I use target = stop minus 1-tick (so that a move of exact same size will trigger either), no trade management at all, and simply look at the win% ... anything above 60% for a sample set large enough (500+ trades) shows a viable directional edge (the stop/target combo can vary from trade to trade based on market conditions, it just need to be target = stop minus 1-tick for each & every trade).
     
    #28     Aug 22, 2012
  9. Yes, I was aware that I probably would see degradation from the test and that there are always deviations from the backtested samples and that those deviations can be for the worse and that the skewed risk to reward ratio made the accuracy of the win percentage more important than usual.

    The problem with backtesting further back is that I'd have to do it manually. The algorithm logic is so complicated that I haven't been able to automate it, so unless I am following a market in real-time or near real-time, it's practically impossible to get trade data.

    Regarding your test, I don't think that would work for me because my trades can have enormous theoretical risk, based on volatility. I say theoretical because in actuality, the average loss is 1/3 the size of the average amount at-risk at the start of the trade, due to the way I move stops. For this reason exactly, I am extremely concerned with understanding why a trade might results in me not being able to move my initial stop. If my actual risk ever began to equal my theoretical risk, there would be no way the system could survive. It is the confluence of events that trigger entry which give me some confidence that this will never be the case. At the base level, about 14% of all trades end by being stopped out for the maximum loss. But, by segmenting trades, I have been able to find trade criteria where, at low end, only 2-3% of trades take the maximum loss and, at the high end, 20-25% take the maximum loss. Obviously, I don't take the trades which fall into that latter bucket.

    I gave the example of "signals within signals" because those are the bulk of the trades I filter. 20-25% of those signals end at the maximum loss. My hypothesis is that due to the increase in volatility necessary to trigger a signal to begin with, that volatility has the "spill over" effect of triggering a signal in the opposite direction, since the market is just moving that much more. We've all seen markets that, once they start moving big-time in one direction, move wildly in the other as well, just as a compensating action to the overall increase in movement. So, I don't think I'm wildly off-base with this hypothesis and why it creates "false positives" for my system.

    Setting those trades aside, this "risk greater than reward" system has a profit factor of about 1.7 on the Euro with a 75% win rate and a PF of 2.3 on the ES with an 80% win rate. That I consider the "base" system because I feel absolutely no need to consider not taking these "signals within signals" as curve-fitting. If the best I can expect over the long haul is a PF of 1.7 to 2.3, so be it. I will lever that up to as much as those markets will bear.

    And, finally, maybe Crude is just a different animal and isn't amenable to this particular type of trade. If it weren't for Crude, I'd be up close to $400/contract over the past week, so it's really the crux of the issue here.
     
    #29     Aug 22, 2012
  10. dom993

    dom993

    I would say try it ... this is the only way to know if your system has a directional edge. You could start using your current max-stop as target, then shrink it (& the target) by increments of 10%. This will at least tell you for which % of your current max-stop you have your maximum directional edge, and which value that is.

    The reality is, if your system doesn't have a directional edge, then a "scalping" approach really is trading noise.
     
    #30     Aug 22, 2012