iBankCoin
Joined Nov 11, 2007
1,458 Blog Posts

Short Term Mean Reversion Still Working

The equity curve shows the results of buying the SPY first close beneath the 2 day moving average (dma) and then closing the long position on the first close above the 2dma. It also sells short the first close above the 2dma and covers the short on the first close beneath the 2dma. In short, it is in the market all the time, trading around the 2dma.

The system uses 10K starting equity, and compounds gains. No stop losses were abused in the making of this system.

Results do not include commissions or slippage, and adding commissions of $7.00/trade lowers the win rate to 62.2% and drops the annual return to 31.80%, reducing net profit by almost 9K.

The point is not to consider this is a viable system, but instead to observe and ponder the anomalies that come and go. I have been wondering for some time now how long it will be before this pattern changes.

If nothing else, when such a simple system works so well, for as long as this one has, I think that certainly the hardest part of trading is mastering the psychology. For example, I doubt even one person reading this has been trading a very short term moving average, religiously, despite the fact that the success of short-term mean reversion has been discussed by many bloggers.

I also wonder, if the same system was backtested during the previous (few) periods in market history where a very short term mean reversion system worked, and some ratios were developed to describe performance, with special attention applied to the ratios when it was outperforming versus ratios as it begin to fail, if a similar set of ratios would also exist for the current data.

Ultimately, the holy grail may be a simple system-health tool, able to be normalized across diverse trading systems, which would turn a system off before a meltdown. If such a tool were to exist, any new anomaly which lasted long enough to collect sufficient system-health data, could be traded.

Its fun to think about, anyway.

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

47 comments

  1. Rob

    if you plot a p/l chart you will see that this strategy (if started in ’93) started to become profitable in ’03, and then it really took off in ’07. The probability distribution is negatively skewed as well, but 10 years of bad luck and only 6 of good will do that 🙂 did i say luck…i meant statistics.

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

    Yeah, no trader would sit/make it through the first 50 trades, I’m sure.

    Regardless, it’s a very good exercise at mean reversion and keeps my faith in my RSI() and LRR indicators. :]

    Good work, as always, Woodster.

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

    thanks for the nice post and research.

    • 0
    • 0
    • 0 Deem this to be "Fake News"
  4. lazy man

    When you get a chance, I would like your thoughts on how I can get better exit signals for a trading system that I use.

    Basically, I use bollinger bands (EMA -2,2,0,20,close) on a 3200 tick chart.

    Trading hours are from 9:30 – 2:30 and all trades must exit at or very near 3pm (discretionary / with tight stops after 3 if it is still pushing).

    System trades only ES (S&P 500 e-minis). Should work with others but tick values would be dif’t.

    Trades are entered at the close of the first bar that closes completely above (long) or completely below (short) the moving average.

    Trades are closed when any of the following:
    1. Stop is reached (I usually allow 2.5-3 points as this is typically just below the avg. drawdown.)
    2. Any bar extends to the wrong side of the MA by 50% or more.
    3. I feel like the trend is over – and there is the problem – too much emotion. I often exit too early or too late.

    Examples from today. Note, I usually trade 4-6 contracts BUT I’m going to use 2 for the example as 1 pt. for ES is $50. 2 contracts are $100 per point (nice round number):

    9:45 – short 2 ES @ 832.50. Max dd was -$50 at 833. Max profit was $975 @822.75. If held until rules 1,2, or 3 forced a close, profit was $450 @828

    11:55 – long 2 ES @ 830.75. Max dd was -$225 at 828.50. Max profit was $750 @838.25. If held until rules 1,2, or 3 forced a close, profit was $225 @833

    This system was used this week with 2 contracts, and it performed as follows:
    9 trades (7 long, 2 short). All trades could have been exited with profit, only 2 would have been closed at a loss if forced to close using rules.

    Max drawdown if ALL trades closed at MAX dd: -$1700 ($188 per trade avg)
    Highest drawdown 1 trade -$275, Lowest drawdown -$50

    Max profit if ALL trades closed at MAX profit: $7875 ($875 per trade avg)
    Highest profit 1 trade (max profit close) $1675, Lowest profit $225

    Profit if all trades closed with rules: $3225 ($358 per trade avg)
    Highest profit 1 trade (rule close) $1100, Lowest profit 1 trade -$225

    So, I make money using this system (this was a good week as we had some nice trends). My question is, what is the best way to exit without leaving profit on the table. I do understand that I would have to be one hell of a timer to be able to max any significant % of these trades but there has to be something better than trader discretion. Without forcing this in any direction (I’m open to anything) I have a couple of thoughts but I do not consider myself a great trader. I can scalp a stochastic (but I sometimes overtrade) and I can follow simple rules.

    My ideas are:
    1. Scale out of the trade (as I say, I usually trade 4-6 contracts)?
    2. Use a stochastic (would have been out early for trade # 1 above and would have missed the second wave for trade #2 UNLESS the second wave was treated as a 3rd trade)?
    3. Use a % ADR with a set PT?
    4. Trailing stop (pain in the ass with TOS)?

    BTW – I finished with 36.25 points on the week – a great week BUT a BIG miss from the 78.75 that “could” have been (but if I could do that, I wouldn’t need a system).

    PS – before anybody says this is just a MACD cross, it has FAR more defined entry and exit as you are not trying to figure out if the damn thing is crossing or not. And I like the 3200 tick chart as I can see the whole day on a TOS Active Trader set-up. It is pretty close to a 5 minute chart but I’ve found that it gives less false signals (the 2nd trade from today would have been stopped on a 5 minute but was left to run on a 3200 tick).

    Your thoughts are greatly appreciated!

    • 0
    • 0
    • 0 Deem this to be "Fake News"
  5. lazy man

    Sorry – 2 more rules,

    1. If you open a trade using this strategy after 3pm, you will get happy slapped – London style.

    2. NO trades are permitted based on anything said on CNBC when using this strategy. Seriously, you will get the okey doke. Mother market knows better than you (unless you are the Fly).

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

    lazy man, I will take a look at this over weekend. Thanks so much for posting it here. I have to say though end of day is what I’m used to so I may need some time to adjust.

    • 0
    • 0
    • 0 Deem this to be "Fake News"
  7. Cuervos Laugh

    lazy – Bollinger bands use standard deviations. You might want to do some data mining on your trades to see what, if any, correlations are between the EMA and your net positive trades are.

    I did something along those lines on my latest post with the 7 Day moving average spread for the SPY.

    • 0
    • 0
    • 0 Deem this to be "Fake News"
  8. lazy man

    Wood,

    End of day would have worked well this week (VERY well).

    I’ve been trading this since September and I can tell you that with futures, I’ve tried EOD and had some great trades overnight and then some really bad trades overnight. I’ve had at least 4 trades where things looked great when I went to bed and I get up to find my “just in case the world ends overnight” outrageous stop loss just got hit (right before it promptly reversed and headed straight through my PT).

    I’d love to be able to figure out the EOD trade and smooth results but I have it in my head that there is just too much tomfoolery. I just don’t sleep as well.

    I have to admit part of why I like this system is that it is NO stress and it does not rely on my “best guess”. I’ve been trading 14 years and I’ve learned that, for me, not being in the “unlucky” 95% is a direct result of eliminating my emotions and thoughts (kind of like marriage).

    Thanks again.

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

    Lazy, do you have the code for this system for Tradestation, using a different platform, or are you eyeballing the entries and exits?

    • 0
    • 0
    • 0 Deem this to be "Fake News"
  10. lazy man

    Wood,

    No, nothing for Tradestation, I use TOS.
    100% eyeball trades.

    Cuervos,

    I did read your PG posts and I have to say – thank you for taking the time – I know that is enormous effort.

    I am at a bit of a disadvantage when it comes to data mining and calculation of the deviation. TOS will only allow tick charts back for 2-5 days based on tick value and I have not kept a log that would allow me to do those calculations.

    That said, your 50 Day SPY along with the Faber article served to support the basis of this system.

    One thing in the Faber article that caught me – they used a % close off the MA rule to trigger the entry – this might make the rule a bit easier to write but I have to believe that it would trigger to many bad trades if used on a smaller time frame.

    Bigger picture, we have a handful of similar mechanical trading systems that all appear to work on the same principles and can be adjusted to work over various time frames. The key to these systems is selecting the right MA to give the entry signal and then figuring out the stops and exits to max the profits. I do like your mention of Turtles. Great book – it really just says shut up and trust the system. The system is smarter than you… Take the trade and ignore the noise.

    I watched the 6E (Euro FX Futures) this week and tracked trades generated by the system. Will try to post a spreadsheet for that…

    I did not take these trades but no regret – I did alright with ES. You may note that entries on your chart may be dif’t – this is due to the way tick charts are displayed but the end result should be very similar.

    BTW – 30 yr Treas (ZB) using a 512 tick chart also had a stellar week.

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

    lazy man, I’m trying to code up this system in Tradestation. What exactly does a 3200 tick chart mean?

    Is each bar 3200 ticks?

    That is how I have it set up right now.

    Let me know and I’ll keep plugging away.

    • 0
    • 0
    • 0 Deem this to be "Fake News"
  12. Danny

    Lazy – 36 pts a week, you fucking sick lunatic! GOOD JOB!

    sorry for the profanity, but thats pretty awesome.

    • 0
    • 0
    • 0 Deem this to be "Fake News"
  13. Danny

    Shed – that is what that means

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

    Lazy man, do you mean that you buy on the close of the first bar that BOTH opens and closes above the XMA(20)?

    Similarly, you would short the close of the first bar that opens and closes beneath the XMA(20)?

    Also, I’m not sure I understand what the bollinger bands are being used for in your strategy.

    • 0
    • 0
    • 0 Deem this to be "Fake News"
  15. lazy man

    Danny,

    Not a typical week – I nailed the exits a lot better this week than I normally would (fear and greed).

    Here is the thing, I left 42.5 points on the table. It occurs to me that I can load up my trades and add risk – or – I can figure out a better way to get out near the top.

    I’m going to imagine that when Wood runs this, we will see that it did not do so well prior to last year.

    I’ve traded since September with great results but we’ve had a very violent market. Who knows, this might work better with something like corn or soybeans during a slower market?? The other option would be to take longer swing trades without the overnight worry. For now, I’ll take the trade that has been presented.

    Wood,

    Yes, 3200 ticks – with ES it takes about 30000 contracts per bar. I used to watch volume and/or OBV (along with MACD & Stoch.) but I like finding an easier way.

    Tick charts do some of the work for you in that the charts are formed by volume. If you take the avg. intraday volume and match it with the right tick value, you get a much smoother chart. It takes a while to get used to. The hardest part was to recognize programs.

    I’ve come to believe that tick charts will produce less whips. I’ll upload a copy of a chart from the ZB last Thursday where the 5 min chart got short (win), long (loser), short (loser), long (loser), long (win). Within 1 hour and a half.

    By the 5th trade (which would have been THE BEST ZB trade of the week, you would be doubting the system… The 5th trade entry was 129,205 with a max profit of 130,305 – +1,305 ticks – mad mad mad cash!!

    The 512 tick chart caught the initial short for a profit and got long and stayed long through the dubious pennant pattern (just by a string) for the big move.

    • 0
    • 0
    • 0 Deem this to be "Fake News"
  16. lazy man

    Wood,

    Yes, Buy and sell rules are correct – just like in school – no touching.

    Correct, BB’s are not useful for entry, I only use them to see strength for the exit.

    Sorry, I should have said…

    • 0
    • 0
    • 0 Deem this to be "Fake News"
  17. lazy man

    Here is the ZB chart I mentioned.

    http://rapidshare.com/files/217480008/Untitled-3.pdf.html

    • 0
    • 0
    • 0 Deem this to be "Fake News"
  18. lazy man

    Wood,

    I did find a site where they provide ThinkScript for TOS for a similar strategy.

    His entries are often late and his exits suck ass but I’m pretty sure the point is to show how to code with ThinkScript – NOT to provide a valid strategy.

    I’m sure this helps you exactly NONE with TS coding but it is useful for those who have TOS to learn how to code & test strategies.

    http://readtheprospectus.wordpress.com/2009/03/02/tutorial-using-strategies-in-think-or-swim/

    Thanks again.

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

    lazy, thanks for that ZB chart! That was very enlightening to see the minute bars against the tick bars.

    • 0
    • 0
    • 0 Deem this to be "Fake News"
  20. lazy man

    Wood,

    I’m just glad you are interested – I really want to figure out how to optimize the exits so it always helps to have more eyes.

    Here are 2 more charts (March 31 and April 1) where the 5 minute would have chopped in and out all day but the tick chart kept you in for more:

    http://rapidshare.com/files/217710314/Untitled-1.pdf.html

    http://rapidshare.com/files/217710522/Untitled-2.pdf.html

    Keep in mind that this is purely anecdotal – I don’t have any backtesting for this (I can’t backtest ticks with TOS) but I do know that I see this pattern a lot with this system. Again, only traded it since Sept. but you start to trust what works. Some people prefer cucumbers when they pickled.

    Maybe Chart or another tech trader could comment on this one?

    I had a conversation yesterday with a trader who has been trading Stochastics and MACD crosses and he is ready to put out a resume – he’s lost money all year. Sad, but it is 100% based on a misunderstanding of the MACD (didn’t realize that it is measuring price acceleration) and that a cross should only be traded if it is on the correct side of the 0 line. After that didn’t work, he switched to stochastics and eventually realized that overbought /sold can stay overbought/sold for a lot longer than his money would stay “his” money. I will say however, that I have come to trust stochastic crosses on a 1 day chart for an index – at least for a day or 2. I wonder how many traders run out of money and drop out every year because they were trading something they thought they understood but didn’t.

    I think the main difference with this system is that it has a 100% fixed entry point (not open to emotion or a best guess) and it is based off of an event that precedes EVERY trend – a price action / moving average cross – not that every cross will become a trend, but hey, nothing says I intend to win the lottery like buying a ticket…

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

    Lazy, still working on coding up your system, as best as I can. Have baseball practice and lots of other stuff going on today so it will not be finished for a while, but I hope to have something we can take a look at by this evening.

    I have tested MACD a little bit and it works (slightly) as a mean reversion tool…meaning when it gets extended well below, or makes a new N day low, then it is often time to buy. By the time momo builds and it gets ready to cross, it is often time to sell your position, NOT start a new one.

    • 0
    • 0
    • 0 Deem this to be "Fake News"
  22. lazy man

    Wood,

    No rush at all… enjoy the game.

    Not that I’m trying to complicate things but a backtest filter might include:

    High ADR to determine if you have enough movement in the market BEFORE you try to trade this (possibly even with PT and/or stops based on ADR).

    Highly liquid market

    Futures or possibly Forex only (no stocks).

    • 0
    • 0
    • 0 Deem this to be "Fake News"
  23. lazy man

    Again, my opinion on tick charts is anecdotal and I know the result is smoothing of the chart but I’ve never really bothered dig into the why.

    I’ll try later to look for more but here are two somewhat decent explainations:

    http://www.tradingmarkets.com/.site/eminis/how_to/articles/-75249.cfm

    http://www.youtube.com/watch?v=_3SoM5vp_TA

    Maybe Cuervos or Chart would have better insight into the technical aspect of this. Then again, you don’t have to know how to build an engine to be able to drive a car…

    • 0
    • 0
    • 0 Deem this to be "Fake News"
  24. MOOBER

    Shed – bought the new Prince 3CD pack at Target ($11.98). Just getting through the first CD called LOTUSFLOW3R.

    I can only take Prince in small doses sometimes, but let me say that this guy is a bonafide guitar hero. Never heard guitar featured on one of his CDs like this. Modern Jimi Hendrix vibe. Pretty sick, actually.

    Off da chain.

    • 0
    • 0
    • 0 Deem this to be "Fake News"
  25. Prospectus

    Indeed, that was the point. And that exit does suck ass.

    I like what you are doing here. I’ll add to the conversation when I get done with some commissioned work I’m doing.

    • 0
    • 0
    • 0 Deem this to be "Fake News"
  26. lazy man

    What a boring day…

    I have a thought on tick bars – a very short bar = support or resistance point (heavy volume around a specific price). Never found anything written about the tech behind this though.

    Also – I think some of this link makes sense, the pro/am part I’m undecided on – http://emini-watch.com/tick-charts/408/
    I thought big block trades are typically the result of arb. programs in futures (IE, big S&P contract vs. e-mini, YM vs. S&P in overnights, etc.). Especially shows up on time & sales in the overnight sessions. I may be wrong on this??

    Only 3 trades today.

    1st trade ZB 11:22 bar – short @ 126,300 – out at next bar @ 126,235 – hit (+ 65 tick) profit target from last week trends – damn, should have stuck to my rules and waited until 3pm.

    switched to 6E for “boredom trade” 1:22 bar 6E long @ 1.3392 – out at 2:23 bar @ 1.3408 (+ 16 pips) – volume too s l o w (happy Easter).

    only 1 ES trade today – 1:48 bar ES long @ 824.75 – out at 2:31 bar @ 824.50 (- 1/4 point) – rule stopped with 50% cross below MA.

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

    Lazy, I haven’t forgotten about you. I’m just having a hard time being able to code your exact system.

    I might get farther by just messing around with some things and suggesting to you some new approaches…

    I’m going to work another day or so on it.

    Thanks for the info on tick bars. I’m going to take a look at it.

    • 0
    • 0
    • 0 Deem this to be "Fake News"
  28. lazy man

    Wood,

    I seriously just appreciate any input you can give so no rush. I know how it goes.

    If the coding is rough due to the visual aspect of the cross, I can say that a Moving Avg Exponential ((H+L+C)/3,5,0)) cross of the 20 period EMA is pretty damn close so it might make life so much easier.

    I’m just not sure how that would correspond to the exact entry (which bar the order hit) if the cross was a few seconds late it might push the entry off to the next bar which could make a pretty dramatic dif. as I sometimes get half of my PT on the next bar alone.

    The script I mentioned above for TOS appears to hit the wrong bar almost every time but it uses a simple MA. Going to try to work on recode to get it to do the EXPMA HLC. We’ll see.

    • 0
    • 0
    • 0 Deem this to be "Fake News"
  29. lazy man

    Caught the run

    Long ZB 122’070 – getting out now 127’285. drawdown was -‘010 finished with +’115

    Staying away from 6E today. ES boring.

    • 0
    • 0
    • 0 Deem this to be "Fake News"
  30. lazy man

    Short ES 813.50

    • 0
    • 0
    • 0 Deem this to be "Fake News"
  31. lazy man

    covered 811.25 +2.25

    • 0
    • 0
    • 0 Deem this to be "Fake News"
  32. lazy man

    Opps – 811.75 + 1.75

    • 0
    • 0
    • 0 Deem this to be "Fake News"
  33. lazy man

    Wood,

    Tried to get TOS to help me with the EMA((H+L+C)/3) change to their code and they could not figure it out. TOS is a toy when it comes strategies and backtesting.

    • 0
    • 0
    • 0 Deem this to be "Fake News"
  34. lazy man

    In ES 816.75, out 818, + 1.25 (3 points on the day).

    Not pushing my luck today, lots of chop. Bigger positions with smaller PT’s.

    • 0
    • 0
    • 0 Deem this to be "Fake News"
  35. lazy man

    Wood,

    Got the entry and stop rules solved I believe. The real question is where to set PT based on these entries.

    Very seldom do I ever see a trade where an entry is initiated and the trade goes negative right away – sometimes small profit only but almost always a profit – just have to know when to take it.

    Long Entry:
    Buy @ market at close of any bar where:
    1. H&L of the bar were ALL above the MA
    2. previous bar H&L were NOT all above the MA

    Short Entry:
    Sell @ market at close of any bar where:
    1. H&L of the bar were ALL below the MA
    2. previous bar H&L were NOT all below the MA

    Forced Long Exit (NOT a PT):
    Sell@ market at close of any bar where:
    1. ((H+L)/2) MA value

    System takes entry signals from 9:30am to 2:30pm.
    Suggested exit at or around 3pm based on continued strength of the trend.

    • 0
    • 0
    • 0 Deem this to be "Fake News"
  36. lazy man

    Sorry…

    Forced Long Exit (NOT a PT):
    Sell@ market at close of any bar where:
    1. ((H+L)/2) MA value @ close of bar

    • 0
    • 0
    • 0 Deem this to be "Fake News"
  37. lazy man

    Okay, it must think I am writting HTML & removing greater than/less than

    here, in English,

    Forced Long Exit (NOT a PT):
    Sell@ market at close of any bar where:
    1. ((H+L)/2) equal to or less than MA value

    Forced Short Exit (NOT a PT):
    Buy@ market at close of any bar where:
    1. ((H+L)/2) equal to or greater than MA value

    • 0
    • 0
    • 0 Deem this to be "Fake News"
  38. Prospectus

    To put the > and < signs in a blog post / comment, use the ASCII codes:

    > = & g t ; (remove the spaces)
    < = & l t ; (remove the spaces)

    • 0
    • 0
    • 0 Deem this to be "Fake News"
  39. Prospectus

    @Lazy,

    You can make a (H+L+C)/3 20 period EMA like this:

    input period = 20;
    def hlc3=(high+low+close)/3;
    def ema=expaverage(period,hlc3);

    • 0
    • 0
    • 0 Deem this to be "Fake News"
  40. lazy man

    Prospectus,

    Do you know a good contact at TOS for TS questions? I’ve never had luck with them.

    Actually, I would love to get this coded (donation wise) once we figure out how to optimize the exits and do some backtesting.

    I KNOW this works – I trade it every day but no real backtesting so far.

    I can make my way through HTML but my brain is like a play-dough factory; something goes in, something else has to come out the other side.

    System is having a nice day… will post today results of all ES, ZB, 6E trades at EOD.

    Still 3 open trades so these numbers will change but:

    Max profit so today far nailing the exits:
    +119 pips 6E
    +12.25 ES
    +.310 ZB

    Max drawdown if you hit the worst possible exits all day long:
    -21 pips 6E
    -3 ES
    -.214 ZB

    As I admit, my discretionary exits do not come close to maxing this – that’s the goal of the thread.

    A couple of trades I did not take as they were shorts into support and/or flashing right into FOMC.

    • 0
    • 0
    • 0 Deem this to be "Fake News"
  41. lazy man

    3pm – all trades closed.

    Here are the detailed results:

    http://rapidshare.com/files/218999911/Microsoft_Word_-_Document2.pdf.html

    Overall summary:

    10 trades on 3 markets.

    Max profit today if you nailed the exits:
    +139 pips 6E (6E stayed in a 94 pip range today)
    +14 ES (+16 if held after 3pm) ES stayed within a 14 pt range today – odd coincidence
    +.315 ZB

    Max drawdown if you hit the worst possible exits all day long (reflects max drawdown during the trade -or- price @ 50% ma cross exit – whichever is worse:
    -21 pips 6E
    -3.75 ES
    -.214 ZB

    • 0
    • 0
    • 0 Deem this to be "Fake News"
  42. lazy man

    P.S.

    32oo tick chart ES
    333 tick chart 6E
    512 tick chart ZB

    • 0
    • 0
    • 0 Deem this to be "Fake News"
  43. Prospectus

    Lazy,

    Sent you a couple of emails.

    • 0
    • 0
    • 0 Deem this to be "Fake News"
  44. lazy man

    Prospectus,

    Response on the way…

    Thanks.

    • 0
    • 0
    • 0 Deem this to be "Fake News"
  45. Cuervos Laugh

    I don’t know TOS but the code sample on Prospectus’ blog looks a whole lot like Python.

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