Trading Lessons/Insights From Coin Flipping

Discussion in 'Risk Management' started by tradingjournals, Aug 31, 2010.

  1. You're right, after closely looking at the curves they are symmetrical, but commissions must be significant. They are reducing your profit by 2/3. Just FYI, for my test, I assume smooth transactions (no commish, no slippage), but, of course, that is not real life. Just makes things easy to compare and reduces complexity. It's not that hard to perform (# trades * $rate)!

    As for the Monty Hall relation to Mike, no I don't think that is it. It is closer to the secretary problem (or the problem Ninna posted at the start of the thread) whereby...and that is where I need to think, hard!

    More to come,
    masterjaz
     
    #291     Sep 22, 2010
  2. Craig66

    Craig66

    What made me think of Monty Hall was the property of swapping with prior knowledge, as is pointed out, this does involve changing your original decision. I'm not an Ambibroker expert, does the original code consider the existing position when making a decision to trade? (BTW, in found the problem in the coding of those problems, I'll fix it up and re-run the tests).
     
    #292     Sep 22, 2010
  3. Craig,
    I may see where you are going with that idea...are you asking if the random # component is the "new information" and the "long" or "hold" component as the original decision? So, to paraphrase and use Monty Hall semantics. The original condition C2>C1 is your original door selection. It gives you either a hold (door 1) or flip (door 2). Then you get a random number which if less than 0.5 you continue (door 1 or door 2 depending) with C2>C1 or >=0.5 you hold (door 3).
    Okay, wow, typing that out was remarkably insightful. So, you do really have 3 doors: "hold", "hold", "flip". Now, were this truely Monty Hall, the win % should be close to 66%, or so I intuitively think, if and only if, the trade was a guarenteed winner (ala a car rather than a goat), which it is not, so that would automatically drop the rate. Given the win rate of the non-random case is 49.8% (C2>C1, my test), I don't think I can calculate the range of possible win rates. The hold is the problem and something I still have not investigated.

    Thinking as I type here, so bare with me...see where that takes you and I'll be back...

    Hmm...
    masterjaz
     
    #293     Sep 22, 2010
  4. Craig66

    Craig66

    One could also cast it in the 'secretary' style, given that my hourly P/L is random, what is the best place to stop? (close the trade).
     
    #294     Sep 22, 2010
  5. Craig66

    Craig66

    I've been thinking about some of the bits floating around on this thread and others, I'm not quite sure how it all fits together but perhaps other people can fill in the blanks. The original random system Mike posed it seems was just to show how non-random looking returns could be generated from a random process. The subsequent system adding the close from the previous days could be interpreted in a number of different ways, perhaps none or all of which are correct. It seems difficult for others to recreate Mike's results exactly, but the crux of the matter seems to be that removing the random element from one of the systems seems to reduce the profit per run average. Though I can't make an exact map from what Mike posted I believe this is something to do with the secretary problem, specifically with the case n=2, there is a algorithm for the n=2 case where if the numbers are taken from a Gaussian distribution one can skew the odd of winning in ones favor. It seems that this algorithm can also work if the distribution from which the numbers are drawn and the distribution from which the deciding 'draw' is taken differ somewhat (though to what degree I'm still not sure). This seems to an example of how using a random number can improve odds within specific situations, which I'm speculating is the idea that Mike is trying to drive at.
     
    #295     Sep 23, 2010
  6. Craig,
    Been busy with other things, but two quick comments, thoughts. 1) The random distribution we are using (as far as I know) is a uniform distribution, not Gaussian about mean = 0.5. Excel's rand() is as likely to give .1 or .9 as it is .5, unlike a normal distribution. AND, as I just realized, it does not matter that the distribution is uniform as it is symmetric about the 0.5 value, such that the rand is boolean and the results are not a function of the actual rand # rather the rand #'s relationship to 0.5... 2) I cannot reproduce Mike's results, at least with the same consistency.

    I'll upload a spreadsheet for anyone/everyone to check out, but as far as I can tell, no-go...

    Surely more to come, but it I'll likely switch back to system analysis rather than trade analysis...we'll see.

    Masterjaz

    http://www.filedropper.com/mikessystemusingspy
     
    #296     Sep 23, 2010
  7. Craig66

    Craig66

    Ok, back to basics, here is the original coin toss system, no commission, no spread on SPY. I have run it though each hour using 50 runs on each hour to produce the average.

    Hour [9] Avg Profit [130.12] Std Dev Profit [6018.92]
    Hour [10] Avg Profit [-1102.72] Std Dev Profit [4668.75]
    Hour [11] Avg Profit [332.68] Std Dev Profit [4917.14]
    Hour [12] Avg Profit [998.56] Std Dev Profit [5144.69]
    Hour [13] Avg Profit [1136.72] Std Dev Profit [5253.74]
    Hour [14] Avg Profit [-9.24] Std Dev Profit [3795.26]
    Hour [15] Avg Profit [492.24] Std Dev Profit [5944.36]

    So 15:55 EST seems to be better than some others, but let's run with 15:55 EST for the next set of tests, since this is what is used in Mike's posts.

    Now we add the first previous days close condition from page 35.

    Hour [15] Avg Profit [-3726.92] Std Dev Profit [4701.4], bad as expected, now let's flip the condition.

    Hour [15] Avg Profit [2017.52] Std Dev Profit [3781.82], good as expected.

    Now lets remove the random clause...

    Hour [15] Avg Profit [6753.42], and it gets better, I simply can't recreate the 'remove the random and it get's worse' effect. Either it there is something wrong with my testing or understanding of the problem or the effect doesn't manifest itself on the SPY.

    One of the other questions asked is how we can make the system better, well opening at 1 EST seems to do the trick.

    Hour [13] Avg Profit [10764.8].
     
    #297     Sep 24, 2010
  8. I think Mike abandoned you because I was not taking part. You see, his only motive is to attack me. He knows the reason, I suspect it. He threw at you that someone told him not to give out details and he bailed out. This is his usual pattern of behavior.

    Anyway, he used ES and you are using SPY. This SPY closes at 3:15 pm CT, not at 3:00 pm. However I do not trust his reports. You see Mike's only objective is to attack others. He is capable of distoring results to achieve this. You are wasting your time trying to rerpoduce his results and he is problably laughing at you.
     
    #298     Sep 24, 2010
  9. Lots of good stuff so far, but, I'm thinking that there may be too much emphasis on reproducing the results of these particular conditions exactly. There are a lot of little details that may cause my sims to be different in some areas. I think the effect has made it through though. Overall, the benefit of doing these simulations comes from looking at the results qualitatively, not necessarily quantitatively.

    A lot of what I'm about to say is my opinion and while some of it is based off of sound statistical principles, my conclusions are definetly open to criticism and interpretation.

    The main issue as presented by the thread starter is the idea of a random walk and what insight it might provide towards trading. I hope that in going through some of ideas in this thread one can easily come to the conclusion that it is very easy to produce a random walk from a set of trading rules. It is also very easy to look at a price move and conclude that it is random or it is not, but, in reality we're all guessing at the real reasons, should reasons even exist in some cases. Obviously, finding reasons is one step in building a model, the next is properly analyzing those reasons for significance and robustness.

    That said, time is important, as is volatility. Simply entering randomly during a certain time appears to produce something worth discussing. Time of day is also very related to volatility. Day of week has some significance as does time of year.

    Craig66,

    Thanks for taking the step I mentioned earlier, per simulating this simple entry for different hours. There are a few well documented reasons and systems for some of these results.

    (1) Opening Range Breaks
    (2) Midday reversals.
    (3) Late date volatility and closing imbalances.

    Whether or not these explanations are the actual explanations is not as important as the fact that something non-random is happening here. All of the factors mentioned so far have distributions associated with them.

    How do we know whether or not these conditions are random or not? Well, I think there are a lot of qualitative methods, but, maybe by injecting a random condition and having an effect "stick" through the testing process has some validity (or maybe not).

    Also, think of what the random condition was doing, it was basically an AND function. One could choose to replace it with any number of conditions and would that condition beat the "best" random runs? Just some stuff to think about.

    A good question to ask is what type of information from a non-random distribution might help this system?
     
    #299     Sep 24, 2010
  10. Lots of good stuff so far, but, I'm thinking that there may be too much emphasis on reproducing the results of these particular conditions exactly. There are a lot of little details that may cause my sims to be different in some areas. I think the effect has made it through though. Overall, the benefit of doing these simulations comes from looking at the results qualitatively, not necessarily quantitatively.

    True, I was just curious to take your results and then tweak them...anyways, I agree back to generalities and ideas

    A lot of what I'm about to say is my opinion and while some of it is based off of sound statistical principles, my conclusions are definetly open to criticism and interpretation.

    That goes for us all! And we've seen our fair share of dissidents. But, in the end, there have been interesting ideas and results posted

    The main issue as presented by the thread starter is the idea of a random walk and what insight it might provide towards trading. I hope that in going through some of ideas in this thread one can easily come to the conclusion that it is very easy to produce a random walk from a set of trading rules. It is also very easy to look at a price move and conclude that it is random or it is not, but, in reality we're all guessing at the real reasons, should reasons even exist in some cases. Obviously, finding reasons is one step in building a model, the next is properly analyzing those reasons for significance and robustness.

    That said, time is important, as is volatility. Simply entering randomly during a certain time appears to produce something worth discussing. Time of day is also very related to volatility. Day of week has some significance as does time of year.

    Craig66,

    Thanks for taking the step I mentioned earlier, per simulating this simple entry for different hours. There are a few well documented reasons and systems for some of these results.

    (1) Opening Range Breaks
    (2) Midday reversals.
    (3) Late date volatility and closing imbalances.

    Whether or not these explanations are the actual explanations is not as important as the fact that something non-random is happening here. All of the factors mentioned so far have distributions associated with them.

    How do we know whether or not these conditions are random or not? Well, I think there are a lot of qualitative methods, but, maybe by injecting a random condition and having an effect "stick" through the testing process has some validity (or maybe not).

    Also, think of what the random condition was doing, it was basically an AND function. One could choose to replace it with any number of conditions and would that condition beat the "best" random runs? Just some stuff to think about.

    A good question to ask is what type of information from a non-random distribution might help this system?



    So, been a ridiculously busy week and I'll hope to have more next week. I've been looking at taking a 'random walk' aka 'coin flip' system and see if it can be made profitable. I'll post some ideas and results.

    Keep up the hard work Craig and others,
    masterjaz
     
    #300     Sep 24, 2010