how do you test for "streakiness"

Discussion in 'Strategy Development' started by BootyShorts, Jan 26, 2009.

  1. How do I test to see if there are in fact hot/cold streaks in my wins and losses. Meaning the results of the next trade is somewhat dependent on my last trade. I do feel this is the case with my strategy (probably because of favorable market conditions) but I don't want to be fooled by randomness. The plan is to add more size with each winning trade, and lower size with losers.

    example. here are todays results so far. how do i go about testing that

    W
    W
    W
    L
    W
    W
    L
    W
    W
    L
    W
    W
    W
    W
    W
    W
    L
    W
    L
    W
    L
    W
    W
    W
    L
    W
    W
    W
    W
    W
    L
    W
    L
    W
    W
    W
    W
    W
    W
    W

    edit: today isnt a good example of losing streaks. but i can get a few losers in a row sometimes
     
  2. MGJ

    MGJ

    Suppose you have a set of observed trade outcomes ("W" or "L"). Suppose the number of trades equals N, an integer.

    One thing you could do, is use a trusted and certified random number generator to create 100,000 different sets of N trade outcomes. On the whole, these are non-streaky since the random number generator produces (by definition) truly random trades.

    Now you can compare your observed trade outcomes, against Truly Random trade outcomes. If yours are significantly different than Truly Random, you can conclude that your observed trade outcomes are not explainable by mere random luck.

    You could measure the serial correlation ("autocorrelation") of your observed trade outcomes, and of the 100,000 sets of random trades. Then compare your autocorrelation value (a number between -1 and +1) on the real trades, with the distribution of autocorrelations from the 100,000 sets of random trades. If the autocorrelation of the real trades exceeds something like 2 standard deviations, it indicates that your streakiness is not explained by random good- or bad-luck.

    Or you could do a Runs Test, on your data and on the 100,000 sets of random trades. (Knuth, volume 2, pp. 65-68). Again see whether your result is far far different than the results seen on truly random trades.

    Or you could fall back on the analysis of classical probability, treating trade Wins and Losses as flips of a fair coin. But beware, classical probability gives "in the long run" asymptotic results. One book that covers it is Epstein's Theory of Gambling, image of the first page of discussion, below.

    [​IMG]
     
  3. Thanks for the very helpful post. I will look into all of those.

    Cheers
     
  4. minmike

    minmike

    If you have 5-20 days worth of data, just test it.

    lag one trade and see if there is a correlation.

    Or just see if you would have made enough in your upping the size on the winners to make up for having the most size on for your losers.
     
  5. What's what I ended up doing yesterday. I found it best to just go with the max size all the time (max size determined by max profit based on slippage, fees, and effect on price as more size increases all those factors). In the long run, reducing shares on losers only meant smaller subsequent winners. It doesn't discount that there may be streaks, but it hurts profits in the end to reduce size and that's all that matters.

    I thought there would be a simple calculation I could use with the following parameters:

    win %
    avg consecutive winners
    avg consecutive losers
    and what not

    edit: it looks like the picture is what i wanted. didn't get a chance to look it through yesterday
     
  6. Good answer by MGJ (one of the better posters still here).

    However to OP, reducing size does not reduce profits if you understand kelly betting principles.
    Get acquainted with it and it will dramatically
    change your viewpoint and understanding of this concept.