One result of my humble coding endeavors was a 4 module trading network. While the modules worked interdependently with each other, each module was also a stand alone system in its own right.
Cheaphooker is one basic building block of that system toolbox.
Originally developed to trade SPY within a short term, risk controlled matrix, the first iteration of Cheaphooker bought SPY at 12:45 PST (15 minutes prior to market close) on Friday with a 2% stop loss and then sold the position at the following Wednesday open. (Buying 15 minutes before the close caught the typical fade in the last 20 minutes of the market on Friday's.) The Friday BUY orders were only executed if the SPY price at 12:35 was greater than the 3 day MA. The system only traded long (it was designed to jig the return of IRA accounts) and offered a nice risk reward payout. The system was never in the market for more than 2 days + the weekend and attempted to capitalize on the tendency of institutions to lay off risk over the weekend and the tendency of Monday's to be surge days, either way (hence, 2% stop) and for Tuesday to be a carry over day if Monday's surge up.
Subsequent refinements in program trading and order flow algorithms, as well as other masking and sway techniques, have significantly impacted the dynamics of that original system, but certain variations still perform very well.
The top chart reflects 5 year results for the current Cheaphooker using IWM, an ETF I find has excellent technical alignment with many of the trading indicators and algorithms that I prefer . . .parabolics, pivots, MAs and MACD signal line. . . and the alignment is fractal, meaning that a proximate technical alignment can be achieved on either 10 minute, 60 minute or daily bars.
The big change to Cheaphooker is that the original bought strength. . .that is, if the current price was above the 3 day MA, the system bought. The new version should really be called Son of Cheaphooker and sells if current price is above the x day moving average and vice versa on the buys. So now the system sells strength and buys weakness. The original system only held 2 days + the weekend while the new version can hold considerably longer.
This is the TS2000i code, (pretty rudimentary), and the settings for the 5 year IWM are (2,10,16,1,12,14). This code version runs with no stops, but you can easily add a 2-3% stop loss or a trailing stop to limit drawdown. With 134 trades over 260 weeks, the system enters a trade approximately every 2 weeks, with an average hold time of 10 days.
I provide the code to enable TS users and other system traders to play with and test on other time frames and trading platforms.
These are the results for the IWM for the past 18 months. The optimized settings for this backtest are (2,8,16,5,10,14). Within this shorter test timeframe Cheaphooker still trades twice a month and holds about 10 day average. The number I really like here is the consecutive losers, both long and short = 1. That fits my risk management comfort level very nicely.
Side Note: When I backtest I typically run the variables in increments of 2 to mute the variance. This obviously does not hold for absolute values defining the days of the week: Monday=1, Tuesday=2, etc..
Now the first thing you're going to say is. . . Hey!, the settings are different for 18 months and 5 years. . .you're just curve fitting the data.
This is a valid argument but, what I'm not showing you is one of the other 3 modules that looks at a completely different data set to develop an adaptive factor for the Cheaphooker variables. That module skews both entry/exit days and lookback period based on momentum driven calculations and is specifically designed to offset curve fitting bias.
There are 62 lines of code for that little tweaker and, frankly, there are easier ways to attain similar performance results.
Reflecting the importance of the day of week entry and exit and the hold duration, similar performance results can be achieved using entry filters other than a MA. MACD, parabolics and stochastics can be substituted with good effect.
Nevertheless, when you look at the settings for the 18 month and 5 year backtests, you notice a close correlation of the lookback MA and the hold duration and I've run umpteen standard deviation studies to confirm my comfort level with the system (Hey!, it my money).
Now here's a flash!. . .you don't have to trade the system. You can just use it as a momentum or pulse indicator to gauge where IWM (or other ETFs, indices, etc.) is within the support/resistance cycle. The system also helps you understand what the probable duration of a cycle looks like. This cycle analysis was not possible with the original version, as it was essentially a scalping system.
With this knowledge you can improve your odds of success using options, option spreads and shorter term daytrading or swing tactics. . .that is, fade the rallies or buy the dips.
This is a little different way of looking at market dynamics than I normally do since it's basically driven by time variables . . . and, as they say, timing is everything.
I hope my little discourse here can help you think of ways to refine the basic Cheaphooker concepts to fit your own unique trading style and comfort level.
No comments:
Post a Comment