Coin Flips

Discussion in 'Educational Resources' started by sunnyskies, Jul 17, 2005.

  1. It's BS.
  2. cmk


  3. TGregg


    I can sure say the trading strat she had on the slide is a dead bang loser on ES. As a matter of fact, it's got a nice performance curve over time, goes straight down with no slippage.

    Over 2 years on an ES 5 min with no commish/no slips:

    Percent Profitable: 30.39%
    Average trade gross: -$2.74

    So at about 430 trades/month plus say $4.80 in commish, you'll lose over 3 grand a month.

    Admittedly she's trading currencies. But if anybody has currency charts in TradeStation, here's the code to run:

    vars: Shorted(false);
    .....if marketposition = 0 then
    ..........if time < 1500 then
    ...............if shorted then
    ....................begin; next bar at open;
    ....................shorted = false;
    ....................sell short next bar at open;
    ....................shorted = true;
    .....else if marketposition > 0 and close < close[1] then sell this bar at close
    .....else if marketposition < 0 and close > close[1] then buy to cover this bar at close;

    Note that it's not a random entry, it alternates longs and shorts. And it doesn't enter trades after 3pm, to make sure we get out before the end of the day.

    EDIT: Nana Trader helped me with the code formatting (thanks Nana) by pointing out that I needed spaces around my conditional signs.
  4. TGregg


    Whoops, I looked again, and see it's YM. I saw that PP text on the screen and my mind just stayed in pips mode.

    Anyway, it's slightly better, but you'll still lose money over the long run, plus commisions and slippage.

    Percent Profitable: 32.98%
    Ave Trade Gross: -$0.85

    That's with absolutely zero slippage and commisions. The performance curve's not as nice as the ES one, looks like this was a very good fade for the first of the two years I tried it, and been hit or miss over the past 12 months.

    The strat is very simple. In this case it alternates longs and shorts, enters at the open of a bar, and exits at the close when the close is lower than the previous close (longs) or higher than the previous close (shorts).

    That's on two years of trading every day the market is open starting at 9:30 ET, no entries after 3PM ET. 10,748 trades.
  5. Has anyone ever automated woodie method? I think the
    main obstacle is that patterns like ghost, samu, vegas
    make various shape that identifiable to eye, but can't be
  6. mhashe


    Coin flip is a random strategy with a 50% win probability over the long run. As long as you cut your losses and let your profits run, with a 50% system you come out ahead.

    Alternating entry/exits is different than a wholly random entry. You're comparing apples to oranges.
  7. TGregg


    Alternating is much closer to 50% heads/tails than flipping a coin in the short run. In the very long run, it has at least the same percentage - randomness being what it is, we could easily have 49.something awful tails and 50.something else heads. And letting the profits run and cutting losses is just as is described in the strat.

    Do you mean to imply that somehow a magic coin can predict with better than 50% chance the future direction of the markets? If not, then you must be suggesting that alternating predicts with less than 50%.

    Turns out EL has a random function. Obviously, the results will vary depending on how magic the random function is. But I bet after a dozen tries, the average will be right near what I found with alternating. Care to disagree before I prove it? :)
  8. If this is the case why are there not thousands of computers running a random entry program? It has the same problem that all trading has. WHERE do you place your stop and WHERE and WHEN do you take profits?
  9. TGregg


    Here's the new code if anybody is interested. You'll have to reply with quote to read it, I'm not formatting this thing again. Basically all I did was add


    and changed the long entry conditional to:

    if shorted < 1 then

    I also changed the initialization of shorted to zero from false, and doc-ed out the code that set shorted to false and true.

    Here's the entire code:

    vars: Shorted(0);

    if marketposition=0 then
    // print(" <<< ",shorted," >>> ");
    if time<1500 then

    if shorted<1 then
    buy next bar at open;
    // shorted=false;
    sell short next bar at open;
    // shorted=true;
    else if marketposition>0 then
    if close<close[1] then sell this bar at close;
    else if marketposition<0 then
    if close>close[1] then buy to cover this bar at close;

    Trial from 4/5/2002 to 7/15/2005 on YM 5 minute chart that opens at 9:30 ET and closes at 4pm ET. No commisions, no slippage

    Run #1
    17800 trades
    -$20,445.00 gross results
    33.47% net profitable
    -$1.15 average/trade
    8871 long trades
    8929 short trades

    Run #2
    17652 trades
    -11,435.00 gross results
    34.28% profitable
    -$0.65 average/trade
    8950 long trades
    8702 short trades

    Run #3
    17696 trades
    -$25,375.00 gross results
    33.81% profitable
    -$1.43 average/trade
    8774 long trades
    8922 short trades

    Must be a lucky coin around here someplace. Let's try some more.

    Run #4
    17742 trades
    -$28,505.00 gross results
    33.56% profitable
    -$1.61 average/trade
    8806 long trades
    8936 short trades

    Run #5
    17804 trades
    -$26,085.00 gross results
    33.27% profitable
    -$1.47 average/trade
    8796 long trades
    9008 short trades

    Run #6
    17754 trades
    -$16,285.00 gross results (woah! This could be the best one)
    34.02% profitable
    -$.92 average/trade (or maybe not, we should get one that's at least in the low -.70s if we try enough times)
    8950 long trades
    8804 short trades

    Run #7
    17767 trades
    -$20230.00 gross results
    33.74% profitable
    -$1.14 average/trade
    8863 long trades
    8904 short trades

    Not looking good there, champ. We're into the home stretch now.

    Run #8
    17786 trades
    -$17,990.00 gross results
    33.46% profitable
    -$1.01 average/trade
    8831 long trades
    8955 short trades

    Run #9
    17854 trades
    -$34,100.00 gross results (ouch!)
    32.91% profitable
    -$1.91 average/trade
    8925 long trades
    8929 short trades

    Well, we're up to the last run (my drink is nearly empty and I gotta refill). So far, we've made a lot of applesauce.

    Run #10
    17731 trades
    -$18810.00 gross results
    34.18% profitable
    -$1.06 average/trade
    8915 long trades
    8816 short trades

    There ya go, 10 runs with the "new and improved" random method. And what a surprise, it's still a loser.
    #10     Jul 17, 2005