iBankCoin
Joined Nov 11, 2007
1,458 Blog Posts

Chili Cook-Off and Equity Curves

I have spent the better part of tonight beginning my award-winning chili for this weekend’s neighborhood chili cook-off. I took second place last year, and my chili only cooked for about 1.5 hours before it entered the contest. This year, my steak, spicy sausage, green and poblano peppers, and garlic (of course) are all marinating in a little Worcestershire sauce and liquid smoke. Tomorrow evening, I will begin cooking it, and it will cook on low heat all night and into Saturday morning. I guarantee you, I will win the contest.

Here is the link to the recipe I use:  Award Winning Chili Recipe

I had hoped to have more time tonight to write about the Advance/Decline indicator. Based on a suggestion from a reader, I began walk-forward testing the indicator, and it yielded great results. Basically, if I loosen the entry and exit criteria so that it takes more trades, it really generates a great return.

At this point, it is almost in the “too good to be true” category, and so I will forward the code on to a friend or two to make sure I’m not crazy.

Perhaps the biggest limitation is that it closes trades at the close, which means it might be hard to replicate all the closes in real-time. I do believe this can be overcome. Anyway, here are some stats and equity curves. All stats include commissions of .01/share.

SPY- Compound Annual Rate of 30.99%

QQQQ- Compound Annual Rate of 35.09%

IWM- Compound Annual Rate of 46.75%

The initial results look promising, and it does well even in walk-forward testing. I’ll be writing more about it soon.

If you enjoy the content at iBankCoin, please follow us on Twitter

22 comments

  1. Damian

    Hey Wood – good stuff – the challenge I’ve found is how do you calculate, in AB, prior to the close, the number of advancers to decliners – meaning, in my experience, the lack of real-time data in AB makes it tougher to execute. Most data providers I’ve seen don’t provide data until after the close….thoughts welcome!

    • 0
    • 0
    • 0 Deem this to be "Fake News"
    • Woodshedder

      I’m thinking that there might be a ratio that could be developed between my calc of A/D and the calc that yahoo or other vendors report, such that near the end of the day some predictions could be made. This way we could use yahoo or bloomberg’s data (albeit delayed 20 mins or so) to make a fairly accurate guess as to what my calc of A/D would be. Does this make sense?

      I’m also going to try a different exit, such as C>ref(C,-1) and see how that works.

      • 0
      • 0
      • 0 Deem this to be "Fake News"
      • Damian

        Or you could setup a separate database that hits against Yahoo data (20m delayed) – create watchlists for QQQQ, IWM and SPY (IWM is only challenge) – grab the data at 3:45pm for right now and run the calc. I’ve tried to do something similar prior – it can be a bit “hair raising”.

        • 0
        • 0
        • 0 Deem this to be "Fake News"
  2. Toptick

    Hi, Wood:

    In my experience, I’ve had no problem trading at the close, possibly excepting low-volume small and micro caps. But for S&P-500 stocks, NDX-100 stocks, and major ETFs, there might be the occasional small jump (due probably to a MOC order imbalance), but I’ve never had a real problem.

    For modelling these liquid stocks, you might add .01 for the bid/ask spread you’ll lose with a market order. I program my market orders to go in force at 15:59:58, and on average get the same price that’s printed for the close.

    … and good luck with chili!

    • 0
    • 0
    • 0 Deem this to be "Fake News"
    • Woodshedder

      No doubt, I have great success using MOC orders with IB. And this method would only trade the ETFs like SPY or QQQQ, so I don’t think slippage would be a major issue, as you mentioned. The problem is determining without a real-time feed exactly what how many decliners there are, in order to determine whether or not to close the trade.

      • 0
      • 0
      • 0 Deem this to be "Fake News"
    • blink

      I was wondering how come that you force your orders 2s before close? Isn’t that a bit too late?

      I’m planning to do similar (time-in-force orders at IB) for liquid ETFs, something like:

      1. SELL current position @ 15:59:00
      2. BUY new position @ 15:59:30

      Maybe I will change those times closer to 15:59:59, but I’m afraid that It won’t fill before close! (I’m talking about positions under $50.000 )

      • 0
      • 0
      • 0 Deem this to be "Fake News"
      • Woodshedder

        I try to match the close price as that is what I use when backtesting. Market on Close orders typically fill with no slippage.

        • 0
        • 0
        • 0 Deem this to be "Fake News"
  3. Aristotle

    Now that’s what Ima talkin’ about!!! Good stuff!

    • 0
    • 0
    • 0 Deem this to be "Fake News"
  4. Jeff P

    Hey Wood, Nice! By “walk forward”, do you imply that you are changing the parameter set over time in this analysis? Or alternatively, that your original rules have worked out of sample? Cheers, Jeff aka Mrkt_Rwnd

    • 0
    • 0
    • 0 Deem this to be "Fake News"
    • Woodshedder

      Jeff, the equity curves posted above were generated from fixed parameters. The original parameters were with bollingers set 1STD above/below the mean. When the decliners closed above=buy and below the BBs=sell. I’ve simply pulled them in tighter to generate more trades.
      The walk-forwards were surprising in that i.) there wasn’t much variation in the optimum parameter settings and ii.) often, after adjusting the parameters based on a six month in sample training period, the out-of-sample results were very close or even better than the in-sample results.

      • 0
      • 0
      • 0 Deem this to be "Fake News"
      • Jeff P

        I see, said the blind man. Good cooking indeed! Best, JP

        • 0
        • 0
        • 0 Deem this to be "Fake News"
        • Woodshedder

          Thanks Jeff. The more I think about this, the more I think that the Bollingers may not be crucial to giving the signals. I think that it may be capturing the markets tendency to mean-revert after an down day. Where it might improve on the simple idea of buying after a down day is that the down day would have to have enough decliners (bad breadth) to generate a signal and then on the sell signal, it would also have to have corresponding stronger breadth, and not just a close higher than the previous close. Anyway, kinda thinking out loud here.

          • 0
          • 0
          • 0 Deem this to be "Fake News"
  5. Jason

    I am making this chili tomorrow! Thanks for the recipe, looks tasty

    • 0
    • 0
    • 0 Deem this to be "Fake News"
    • Woodshedder

      If you marinate overnight, you’ll need to add more liquid smoke than the recipe calls for, but add it when you add the rest of the spices. Maybe 1 tsp more. I use less salt than the recipe calls for, and a little less cumin and coriander.

      • 0
      • 0
      • 0 Deem this to be "Fake News"
  6. The Fly

    I love me some chili.

    • 0
    • 0
    • 0 Deem this to be "Fake News"
  7. Woodshedder

    I won! 1st Place!

    • 0
    • 0
    • 0 Deem this to be "Fake News"
  8. Martin

    Any chance of posting the code?

    I’m not good enough to program this myself based on the information posted here, and I would certainly like to test the strategy on Norwegian equities 🙂

    • 0
    • 0
    • 0 Deem this to be "Fake News"
    • Woodshedder

      Martin, for some reason, the code was allowing the system to open a position for every signal given, even when it had no cash to do so. This is what juiced the results. Sorry to get everyone excited over nothing!

      • 0
      • 0
      • 0 Deem this to be "Fake News"