Time Based Stops

Discussion in 'Automated Trading' started by Craig66, Apr 21, 2011.

  1. Craig66

    Craig66

    Attached is a histogram of the time taken to close my winning trades vs. the time to close losing trades (the bottom axis is in seconds), it is obvious that the losers and winners have different distributions and that my trading could benefit from adopting a time limit on open trades. My question is to the math guys, given this information how would you systematically decide the length of a time based stops given the overlap and the non-Gaussian nature of the distributions?
     
  2. jelite

    jelite

    This is an interesting question. Is that a momentum based strategy?:) Just looking at your densities (which might not be stationary... but let's assume that) 5000 seconds looks like a good point to cut it off since from that point on the winners decay just as fast as losers (and losers are much more frequent the longer the trade takes). Did you try to put that time stop around that time and see if it improves your results? The caveat is that these densities are absolute (not relative to the time of exit...). It's a natural desire to try to optimize exits but one needs to realize that without considering the structure of the trade itself, one would have to introduce additional edge (alpha) to achieve a better exit that the original one. If your strategy is some sort of momentum based one (as the densities suggest), then the time exit may introduce that additional alpha. Let us know if you could find an improvement of any kind considering time exit. In one of my strategies, I found that tightening my stop to a well defined location AFTER a certain amount of time has passed introduces additional alpha to the trade. That however depends on the strategy itself.
     
  3. Craig66

    Craig66

    I haven't actually tried anything yet as I wanted to throw it out there first and see what came back. The more I think about it the more I realize that what seems like a superficially simple question is actually quite complex. My current thinking is that I could resample the results, measure the average performance, then drop all samples longer than some point and redo the resample. Hopefully this procedure would show a maxima at some point. But I'm open to ideas...
     
  4. Craig ... your instinct to explore the depth of what could well turn out to be a complex problem/riddle to solve is understandable. Yet I urge you to flip the equation upside down. Look at it as a simple opportunity. How do i goose my results by making some simple and QUICK adjustments based on the numbers I have.

    Then redo your numbers and see if you can goose results a second time -- quick and easy. Then, as you reap the fruit of your relatively light labor everyday and watch your account grow at an accelerated clip, dig in. Look at it deeply. Don't spare the labor a bit as you extract the final few difficult squeezes out of your time distribution.

    But first ... take the damn cream! And keep us informed. Your initial thinking is great. An interesting take on your trading.

     
  5. Can you break this down into probabilities and expectancy?

    I would examine your expectancy for various hold times.

    So for:
    - 2500 > t <= 5000 : what is the Avgerage win, average loss, # wins, # losses.

    - 5000 > t <= 7500 : what is the Avgerage win, average loss, # wins, # losses.

    etc etc.

    Choose whatever time interval you like and then determine the point at which your expectancy goes negative.

    Turning what you find here into a trading rule is more complex and is going to be dependent on your other trading rules (specifically if you use stops and targets). A simple time stop might work; placing a time stop at the point at which expectancy goes negative may be effective.

    Can you post the strategy's trade PnL distribution in % terms? Is it normal? What's the win rate and what's the avg win and avg loss?
     
  6. Craig66

    Craig66

    Thanks Mike, the expectancy idea sounds good, here is the P/L distribution. Avg Win/Avg Loss = 0.59, Win% = 80.
     
  7. gtor514

    gtor514

    You want to minimize exposure time to the market. You want to gain profit in the fastest period of time. And likewise, get out of a loser as fast as possible. So try to optimize your strategy with two more variables, Tp, Tl

    Most strategies will optimize for P/L

    (P/(Tp+Tl) / L

    where..
    Tp = time for winning trade.
    Tl = time for losing trade.
     
  8. Craig66

    Craig66

    I'm not sure I understand your formula, is it possible to expand on the meaning?
     
  9. gtor514

    gtor514

    I submit that you want to shift those false signals in your original post as far left as possible and get them over quicker.

    If a price moves in a straight line and you give your trades equal amount of time to become a profit or a loss than we don't need to optimize a strategy with a time component. You can be profitable by having a higher win/loss and reward/risk ratio.

    However; this is not the case, therefore I suggest you optimize your strategy with two time components. One for the amount of time in time in losing trade and the other for time in winning trades where each are minimized. By optimizing with time, your strategy will shift to capture more profit faster and get out of losing trades faster. This will free up more equity and reduce your overall risk footprint. Essentially optimizing in this sense improves your entries.

    I drew up something real fast to help explain what I'm talking about. I may be way off base of what your asking so ignore me if it still does not make sense.:(
     
    • plt.gif
      File size:
      4.3 KB
      Views:
      131
    #10     Apr 22, 2011