Developing a profitable system(infrastructure) on a (pseudo-)random data

Discussion in 'Data Sets and Feeds' started by TSGannGalt, Jul 7, 2010.

  1. To your first point, No - you're not understanding the math... you jumped to an incorrect conclusion...

    To your second point, you changed the initial variables, hence the probability will change.

    Attached please find a modified sheet that may be clearer.

    The link below will shed some light on this for you as well:

    http://en.wikipedia.org/wiki/Secretary_problem

    What we're looking at is a trivial case of the above problem.

    If after this you still don't see the "neat property" then we'll give it another shot.
     
    #31     Jul 9, 2010
  2. Kewl.

    Odds Algo. / Optimal Stopping.

    This stuff is new to me... I never knew they had an official name of "some" of the stuff I did...

    Thanks... Who said, you can't learn something in ET???

     
    #32     Jul 9, 2010
  3. Mike805, gotcha, thanks. The mathematics is way over my head. Here's a nice American Scientist article on optimal stopping that I had coincidentally saved for later reading.

    http://www.americanscientist.org/issues/feature/knowing-when-to-stop/1

    Edit : So yes, you were right, and this is certainly a "very neat property"! I believe this is a.k.a. the "Pick the largest number" puzzle. Man, isn't mathematics awesome. Now, if I only understood it!!

     
    #33     Jul 9, 2010
  4. That's not being pedantic, that's really what this thread is about, although that's not clear from some of the posts.

    Re: random, pseudo-random, etc., I think that's a pretty misleading name for what you're doing. I didn't realize that's what you meant at all. Now I think what you're talking about is bootstrapping: taking a given set of data points, drawing one, replacing it, drawing another, etc. It's resampling.

    But really what you're doing is studying the distribution itself. If you can resample and get non-stationary, non-iid results, then you've learned something.

    If you want to study a backtested strategy rather than the properties of your data, one easy way to learn some things is to take your historical trades, apply a coinflip filter to each entry, run 1000 simulations, and plot all the time series on a single graph. Then look at mean/median/etc.
     
    #34     Jul 9, 2010
  5. Some of these theories are interesting as it applies to the one touch blues. Many traders stop or take profits on the first touch of a price and feel they miss the meat of the move etc.

    The odd's algo fixes the lower bound win rate to .368 if you pass on the first touch and take the next better exit. The upper bound can be as high as 1.00.. ie all perfectly improved trades.

    Essentially your betting to improve either your initial stop/profit with minimum 37% odds of improvement. If the improvement is 2x the value of the potential 2nd pass loss in theory you should consistently win.
     
    #35     Jul 9, 2010
  6. Good find on that article! It does a great job explaining the problem. Math is one of those interesting abstractions that can explain certain things very well and fail miserably at explaining others. The trick is knowing what is useful and when to apply it, and, at the same time being aware of the inherent pitfalls...

    If any of you are into poker, you'll know of Barry Greenstein; a very succesful poker player. He's been quoted several times stating: "Math is idiotic". One time in particular he won a mid-six figure pot (no-limit game) after being a 4-1 underdog pre-flop.

    Anyway, as much as I like poker, how do we create an interesting trading rule out of this? I believe MGJ had a very good coding example that, if massaged a bit, might show something interesting... or it may not, I've actually never used pure closing prices in this type of analysis.

    The 50% figure is interesting nonetheless.

    Mike
     
    #36     Jul 9, 2010
  7. #37     Jul 9, 2010
  8. nLepwa

    nLepwa

    At each step (or turn):

    1. Close your position.
    2. If expected move = up, open long position.
    3. Else open short position (or stay in cash).

    This strategy applied on a process with normal distribution has positive expectancy as long as:

    fees < |avgGain|*0.66 - |avgLoss|*0.33.

    Or in other words, if your process has a constant step size of s (at each step, the cumulative value is the previous one +/- s), then you have positive expectancy when:

    s>fees*3.03

    Your equity curve is then directly proportional to the trading frequency, which is linked to s by the sqrt() function and Pi.

    Your trading fees determine your equity curve.

    Let me guess...

    The way around this is ... to discretize price using a step function and to then normalize it with a volatility measure to eliminate fat tails?

    One could also use the Arcsine law I mentioned earlier to compute the skew in the distribution. ;)

    I would also look at the Monty Hall paradox. :)

    Ninna
     
    #38     Jul 9, 2010
  9. I tried implementing the algo in this paper some years ago.

    I could not find a real-world price series it works on in real time, at least not on a daily time frame.

    This was in 2005. Maybe markets have changed since then or maybe it would work on a shorter time horizon.
     
    #39     Jul 9, 2010
  10. I read this article and my head just asploded.

    I have been playing around with hairbrained schemes in NinjaTrader; 37% success kept coming up (and when choosing the opposite direction, 63%) as the number of profitable trades in various strategies. I thought I was seeing a rounding error from one third (or two-thirds) because that somehow seems more natural. Now I know there really is some magic surrounding 37%.

    Got any more equally brain warping articles?
     
    #40     Jul 9, 2010