Trading Lessons/Insights From Coin Flipping

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

  1. Craig66,
    I have done all the tests we need using Excel and the SPY ETF rather than the futures as Mike used. The results are as follows. Time period was 1-29-1993 to 9-20-2010 adjusted for dividends and splits. Results are for 1 share. Buy and hold would return $80.58.

    Case 1: Random entry avg of 25 runs = $1.446
    Case 2: Random C1>C2 avg = -$70.41
    Case 3: Random C2>C1avg = $73.69
    Case 4: C1>C2 = -$145.25
    Case 5: C2>C1 = $145.25

    For all systems, the trade entered upon market close and a exited at next day close, upon which the next trade fires...not the best situation (esp. if live with respect to commish), but for this test it's fine.

    For cases 2, 3, just as described above, each trade was closed the next day and a new trade was entered ONLY if both conditions were met (rand # + C1>C2 or rand # + C2>C1). This may cause slightly different results from Mike, but they still look similar...

    There we go...I'm going to double check the results but they seem in-line with the prior results.

    By the way, anyone know how to print the "less than" sign. It must be a special HTML character or something...
     
    #261     Sep 20, 2010
  2. Craig66

    Craig66

    Thank you for that masterjaz_99, is the result of case 1 supposed to be "$1.446" or is the decimal point in the wrong place?
     
    #262     Sep 20, 2010
  3. Nope, just added too many digits, doesn't make sense...$1.47, which is logical given it should be breakeven...

    The most interesting item being it appears the random component drops the profit and the condition C2>C1 is a decent signal, but maybe could use some refining. I don't have trading stats on it, yet.

    Masterjaz
     
    #263     Sep 20, 2010
  4. I have been busy with other things and was not following during the recent heated periods of this thread. I could see that the thread seems to be finally back to its normal professional course. Let us keep it that way, and thank those who contributed something useful.

    I read Mike's criteria, and made a connection with some fundamental problems. I did not want to comment before contacting Mike. I sent him a PM, and he answered something like "I got it", and gave his ok that I provide comments in this direction if I want to. I however felt that he introduced the idea here in the thread, and I believe it is befitting that he keeps the lead on it.

    Mike: the floor is yours. :)


    Please join me in thanking Mike for giving from what he knows. I can tell you that the conditions he has put in there are connected to some "well known" problems.
     
    #264     Sep 21, 2010
  5. I do not think you are correct. For instance what if the random part leads to the selection of trades that lead to paths that has less excursion (mean reversion). What if the method is designed (directly or by consequence) to reduce holding time?

    For instance it would interest to know the success rate due to the random part. More than 50%? 66%? 75%? :)
     
    #265     Sep 21, 2010
  6. Thanks TJ,

    As I mentioned in my PM to you, these ideas aren't meant to be profound or innovative. Let's just have some fun with these ideas and see where it goes.

    I actually got another PM a while ago that was a bit telling as well. The message consisted of telling me that I shouldn't be giving away this material... I do kind of agree with that person so I'm not going to spell out the entire idea here, but I'll drop hints.

    My personal motivation is similar to that of a poker game. Say I have 5 cards in my hand (that's my knowledge base). I decide to show 2 to you and in exchange you show me 2 of yours. Without all 5, you cannot put together the entire hand I'm playing, but, you might be able to use those 2 cards to your advantage (ok, so maybe that sounds more like rummy).

    Anyway, my motivation is to get some people to show those 2 cards they might be playing with. Masterjaz started that with doing a 5 day index thingy (thanks for kickstarting this). An exchange of information where no one is giving everything away in entirety, just bits and pieces.

    Ok, back to the content. The secretary problem has a very interesting property that I discussed in another thread a while back. That property (explained crudely) is the idea that a distribution, independent of the distribution being used to model a type of dynamic, can provide information.

    Re-reading that last bit sounded kind of vague and circuitous... but, it might illicit some good responses.

    Mike
     
    #266     Sep 21, 2010
  7. Mike and TJ,
    Yep, we are back on track, but with a major hiccup. Mike, I re-ran your tests, only using the SPY's and with slighly different criteria, yet similar results. The main problem being my tests showed the random entry actually reduced the profitability of the close condition. In other words, the close condition was a profitable strategy and the random entry only reduced the # of trades thereby reducing the profitability.

    Now, the major issue with my backtest is I closed the position every day, that is the holding time is ALWAYS 1 day (from close to close). If the random # + close condidtion is not met and the position should be held-over from the previous day, it may be possible that adds to the profit. Given, I'm still doing everything in excel, it's a bit trickier to test.

    Previously I requested a run of the "flip close condition" without random entry, but realize now it is just the opposite of the "close condition" which lost ~80k. So the basic strategy of long C2>C1 should net ~ +80k whereby the average with random + C2>C1 netted ~45k.

    Did I miss something???

    Thanks,
    masterjaz
     
    #267     Sep 21, 2010
  8. Yes, the fact that Mike is holding 3 more cards!
    :D :D :D

    p.s. i am trying to set up a test to illustrate my point earlier. will be back soon
     
    #268     Sep 21, 2010
  9. Maybe to save you some time, I believe you are right about hold time. Using my SPY test, the rand + C2>C1 only traded ~2100 of the 4443 days, so your intuition was correct, roughly.

    But still post your results, data are a good thing.

    masterjaz
     
    #269     Sep 21, 2010
  10. i have tough time coding even simple scripts so i can't exclude the possibility of mistakes in my code. what i have right now seems to be working as expected. it would be good if i could match Mike's results so far so that we start with similar setups and could talk about the same thing as more conditions are added, etc.

    I run data on 5-min bars of SPY. right now the testing period is 2008-present just to illustrate the difference in holding time. my script is essentially always ON. if it starts with a Buy it waits until Exit is generated, Sells Long Position AND Opens Short (the same logic is for exiting Short and Opening next Long). is this the correct setup?

    the hold time is essentially doubled. i think it is important to keep this in mind when figuring out the effect of the random#.

    [​IMG]
     
    #270     Sep 21, 2010