Learn To STOP Curve Fitting!
Download this free guide on how to stop curve fitting. Following these four simple steps can improve your trading dramatically!
Many moons ago… (see what I did there) when I was in my infancy as a trader, I was a regular in a chat room of what used to be pivotfarm where they had a free tool in beta testing that was basically an audio “tape reader.” It would make popcorn sounds when big selling pressure was hitting the tape, and crickets when big buying pressure was hitting the tape… Anyways there was quite the assortment of traders in the room, and I learned a great deal from many of them. Perhaps the greatest lesson that I learned in that room, that I can unequivocally say is one of the undeniable few truths of making a living via the markets, is that there is no “right or wrong” way to extract money from the markets.
I see it all the time on twitter and elsewhere where traders or money managers think that there is only 1 way to make money in the market, which couldn’t be further from the truth. One of the classic debates is the merits of fundamental analysis vs. technical analysis… Both camps can argue to the death that one is fubar, and the other is the “only correct way to make money,” but ask Warren Buffet if only idiots use fundamental analysis, or Paul Tudor Jones if only jabronis use technical analysis, and see what they say.
So to circle back to the chat room, I remember there was this one trader in there (her name escapes me), but I witnessed her extract money from the markets at an amazing clip, in real time, using nothing but time cycles and moon cycles, all of which are considered nonsense by the substantial majority of traders and investors. She certainly made a believer out of me (keep in mind this was 2007-2008), so I decided to go back and test if there was in fact an edge to have in trading moon cycles or if my eyes have been deceiving me for all those past years.
Theory: From what I had remembered, the main thesis was to buy a full moon and sell on the following new moon. So let’s see what that looks like in an equity curve… For testing, we will use a flat 50K of buying power per trade rounded down to the nearest 100 shares. We will be testing this idea on the SPY for the last 20 years; I’m not including any slippage or commissions as this is just a thought experiment and not a complete trading system.
One last note is that my coding is not exactly perfect, as when I go back and manually review the trades, they are off by one day about twice a year… Even though the moon is almost in a perfect circular orbit, it is not quite perfect, and depending what hemisphere you’re in (because of the angle you are viewing it from), the phase might appear a tiny bit different and can fall in one day or another. For this test we are assuming that we are in the northern hemisphere in the eastern standard time zone, and even though the date will sometimes be off by a day, it’s close enough so that we can get a general idea of the effect. So without further ado, let’s see what it looks like:
So that certainly isn’t the worst equity curve I’ve ever seen (keep in mind there are no other filters, no stops, and no profit target of any kind). Assuming you start out with a $25K trading account, the return on initial capital is almost the exact same as buy and hold the last 20 years (284% vs 287%), yet this system is only in the market 50% of the time, and the max drawdown (24.77%) is way less than what buy and hold produces. A couple of interesting notes about the initial test are that when the markets have experienced “bubbles” a.k.a. the lead up to the dot com bubble, and our current bubble, this sweet and simple methodology has really done well.
It certainly floundered around in the 2000’s, but since then the bottom in 2009 has really outperformed buy and hold with zero other filters (and no stops). One other big thing that stuck out to me was the percent winners which came in at an impressive 65%. Taking these things into consideration at least at first glance, it’s hard to not conclude there is something with the moon cycle and its relationship to the SPY. Let’s try to add a simple filter or profit target to see if that improves the results and equity curve.
First let’s try adding a simple moving average to define a bull or bear market on the SPY daily chart. We’ll test from a 10 SMA-200 SMA in increments of 10 (price must be ABOVE the moving average for the trade to trigger) to see if that improves the moon cycle idea.
So as you can see, pretty mixed results. Using a 170 simple moving average is what tested as best, but we lost a lot of net profit, even though the profit factor has increased. So I wouldn’t use this particular filter just because it really doesn’t improve the results.
Let’s quickly reverse the filter to only take trades in a bear market (or under the moving average) and see what we get. We’ll run the same test, 10 SMA – 200 SMA in increments of 10.
Kind of the same story, the efficiency of the idea improves as we get a better profit factor, and bigger average trade for the top results, but it comes at the expense of losing a ton of net profit, even at the most optimized values that appear to be outliers.
Let’s see if adding a profit target of some kind can improve the idea. We’ll test a profit target ranging from 1000-8000 in increments of 500.
So this is a bit more interesting. As you can see, any profit target above 6000 makes no difference, but using a profit target of 1000 seems to be quite helpful. Using the 1000 profit target, you improve the profit factor, cut the max drawdown in almost half, and the equity curve GREATLY improves.
You do lose about 4K in net profit, and there is certainly the potential that it is a slight outlier with further testing needed to draw a better conclusion, but at least in this initial test it is very helpful. Let’s quickly test if a stop will help the performance… It has been my experience that stops on swing trading systems almost always hurt the performance, but let’s see if one will help the max drawdown again or improve the profit factor. Here are the results for testing a stop loss between 1000-8000 in increments of 500 (profit target has been removed).
Yep, every single stop hurts the performance.
One other idea I wanted to test was a day of the week filter. The overall market has shown day of the week tendencies previously, and because this is in essence a timing system that relies on a monthly calendar pattern, shouldn’t it also make sense that a weekly calendar pattern would improve the results? So let’s see if combining the moon phase tendency with the day of the week tendencies will improve the results. In Tradestation, 1=Monday, 2=Tuesday, 3=Wednesday, 4=Thursday, 5=Friday… Also keep in mind that full moons that occur on Saturday or Sunday will be triggered on the following Monday or Tuesday.
Now this is very interesting… Moon cycle trades that occur on Tuesday (2) or Wednesday (3) do very, very well. They both have profit factors over 2, and much larger average net trades. All of the days of the week are profitable, but Friday seems to be the weak link. This filter actually lines up with known performance by the day of the week, as Tuesday and Wednesday are the most positive historically anyways. Here is what the equity curve looks like if you only take the moon cycle trades that fall on Tuesday or Wednesday:
You still get a pretty nasty drawdown in 2008, but the equity curve is certainly better, and a profit factor of 2.11 is certainly an improvement.
Lastly, just for fun, let’s see what it looks like if we only take the moon cycle trade on Monday, Tuesday, Wednesday, or Thursday and use a 1000 profit target. (Below I’ve zeroed in on the profit target testing from 500-2000 in increments of 100, and as you can see, 1000 does not appear to be an outlier, as anything from 600-1500 is fairly stable).
So there she is, not too shabby… the equity curve really looks pretty good, we improved the profit factor, we greatly improved the max drawdown, and we didn’t lose a ton of net profit. So in conclusion, I certainly think there is something with the moon cycle and its effect on the markets. If you really think about it, it’s not a stretch to come to the conclusion in the first place since the gravity of the moon affects every living thing on this planet, so why would it NOT affect the markets might be a better question.
Something that has the power to move oceans could certainly have the power to move the market a couple of points, right? There are a TON of other things that could be tested on this theory, and remember this was simply a thought experiment and NOT a complete trading system. But I’m certainly intrigued, and intend to do more testing of my own… If you have any ideas, please share them and we’ll see what we can come up with!
P.S. I originally wrote this in June of 2015, so we’ve had an out-of-sample section of about 18 months now. Here is where the system currently stands (hint: it’s still working).
Phase = AbsValue(2 * (FracPortion(DateToJulian(Date+dayone)/29.53059 + .4137) -.5));
Bullmarket = Close > Average( Close data1, TrendFilterPeriod );
BearMarket = Not Bullmarket;
If (Dayofweek(date) = 1 or Dayofweek(Date) = 2 or DayofWeek(date) = 3 or Dayofweek(Date) = 4 ) and Phase < Phase and Phase > Phase then Buy ("Full Moon") this bar at close;
If Phase > Phase and Phase < Phase then Sell ("No Moon") this bar at close;
Ben has been a private trader for over 7 years and is now a TradeStation Trading App Developer. Finding and exploiting edges is his game, as he’s not only a trader but a professional sports handicapper. You can find him on Twitter @TRUmav for financial commentary, or @BtheHouse for sports betting commentary. If your interested in more models like the one above, check out BtheHouse.com. Ben always enjoys sharing and brainstorming ideas with like-minded traders, bettors, and investors.
Please log in again. The login page will open in a new window. After logging in you can close it and return to this page.