Directional edge testing

Discussion in 'Strategy Building' started by dom993, Jan 24, 2013.

  1. Another thing to bear in mind is that Last Traded Price (LTP) backtesting (despite steps that can be taken to improve the general realism of fill/slippage assumptions) suffers from the drawback that it takes no account of whether the LTP was at the bid or the ask, and therefore the “spread” (or even a multiple of 2 x the spread) gets introduced as an unknown error in the results.

    I have tried to think how that might be related to your case here, but haven’t succeeded in figuring it out!

    Perhaps others will have a clearer idea?
     
    #11     Jan 25, 2013
  2. dom993

    dom993

    Using random entries, the flat line would be flat at 50% ... and as the stop/target size increase, I do expect any directional signal to end-up reverting to "random", ie. 50%.

    It took me a while yesterday to start doing proper measurement, because when I removed the exit signals, I was left with Long & Short trades opening simultaneously (a Long opening while a Short is still open, etc.), and at that point stupid Ninja pairs the first Buy after a SellShort in the trade log and that messes all up. I had to run Longs & Shorts on separate instruments (prior expiry for one of them) and calculate all entry/exit prices in the correct TF before I could get to usesul stats.

    My understanding of those stats I initially shared, as the target/stop distance increase, there is more and more trades taken out on the exit signals, less and less on the target/stop, and that flat line at 56.5% is the system win% w/o any target/stop.

    After clearing the mess with Ninja handling of concurrent Long / Short trades, I could analyze things better - using the trade log & detailed exit names.

    My analysis: the signals I use for entry & exit have a lot of noise. As can be seen in the Stop/Target columns, increasing the size of the stop/target does improve the win% very significantly - but on a much decreasing fraction of the total trades. The other trades are taken out by the exit signals, and apparently those exit signals have a better win% when they happen "close" to the entry signal, before the trade reach either stop or target.
     
    #12     Jan 25, 2013
  3. dom993

    dom993

    1) 2) 3) 4) : correct. I am using 1-sec. TF for fills in backtest (there is no point using the 1-tick TF, it is synchronised to the second with the other TFs).

    Correct

    I think you are correct, it is the exit signals that create that flat line.

    Thanks a lot for your analysis. BTW, this is not a mean reversion system, rather a "follow-the-trend" system. Or should I say a follow the "trend-signals" system, as currently the system doesn't care if the signal was wrong - as evidenced by price moving against that trade.

    I have an optional "mean-reversion" component (not discussed yet), whereby when the actual trend is evidently against the last signal, the system will add-on at some point ... I really don't like it, but it improves every performance measurement - P/F, DD, avg/trade.
     
    #13     Jan 25, 2013
  4. dom993

    dom993

    I am presenting here the Summary report for this prototype, taking all entry signals (3 types), and using add-ons on 1 of those types. (max number of contracts 58, avg. number of contracts per exit point: 6).

    This gives me about 55.4% win-rate (for entries), with an avgW/avgL = 0.99 (1-t slippage per entry / same for exit / commissions included), on a total number of entries of 31,338 (5169 exits).

    Is there enough here to "prove" there is an edge in there, albeit not big?

    I certainly like the symmetry of the results for Longs & Shorts (aside from the DD, which is way bigger on the Long side).


    Edit: just computed the win% as a function of exit points, it is 56.58%
     
    #14     Jan 25, 2013
  5. dom993

    dom993

    P&L graph:
     
    #15     Jan 25, 2013
  6. dom993

    dom993

    Per Year:
     
    #16     Jan 25, 2013
  7. dom993

    dom993

    P&L per exit:
     
    #17     Jan 25, 2013
  8. dom993

    dom993

    This one is a (partial) distribution of exit P&L ... the label under each bar is the average per trade in that bar (each bar is $2k wide).

    I restricted that view to about 60% of the P&L, the tails are pretty long on each side, and (of course) longer & heavier on the positive side.
     
    #18     Jan 26, 2013
  9. Sorry, not clear to me what the difference is between how you take these two measurements...
     
    #19     Jan 27, 2013
  10. Sergio77

    Sergio77

    Too low of a win rate. Add slippage and other factors and all the gain is gone.
     
    #20     Jan 27, 2013