Friday, August 29, 2008

3 Lows, 2 Highs

This REALLY concludes my study of 3 Day Lows. This version is unfinished business from Clueless's earlier incubator of the system. The system still buys the lowest close of 3 days, but then exits on 2 higher closes. As expected this is an active system and kicks out almost 1 trade per week over the 280 week test period.
And the results are comparable to out other 3 Day Low models, if you're not intimidated by the frequency of the trades.
Just to tweak things a little bit I added a $65/100 share stop loss. While this increases overall return by over $1000 while reducing avg losing trade $ and max intraday drawdown, it also increases the max consecutive losers to 4, and increases the total number of trades by 50, a substantial number.
Strictly from a practical trading perspective, I'd be inclined to favor the model without the stop.
TS2000i code is below.
Inputs: Len1(3), Len2(2);
If Close = LowestFC(close, Len1)
Then Buy This Bar at Close;
If Close = HighestFC(close,Len2)
Then Exitlong This Bar at Close;
I left the variable Input model intact. If you optimize the system with settings of 2-10 on each Input you might find some (pleasantly) surprising results.

Thursday, August 28, 2008

3 Day Lows - Part 3

Here's the 3 Day Low of the DIA, although it's optimized for a 10 day fixed exit.
All studies shown are without stops. I looked at some implications of stops yesterday to mange risk but this is still a work in progress.
Above is thumbnail record of the optimization study indicating the relative returns with a 7 to 10 day fixed exit. Clearly 10 is better, by about $ 1500, the relative trade performance almost identical using 7 and 10 day exit values.
This will be the last post on the 3 day low system, for a while. I've got lots of other themes I would like to explore and time is, well. . .time is a dwindling resource.
Some of the trading parameters I hope to touch on include:
Volume. . . that's a biggy
Pivots. . . my favorite daytrading momentum guide
Linear Regression. . . another versatile indicator of market probabilities
Pairs Trading. . . often overlooked but some prop shops swear by it as the best way to hedge risk
Here are a number of 3 Day low/ Exit on 7th day system performance examples. All of them stick to the 3/7 formula except MCD (and DIA as noted above), which actually works better on 3/11 settings. . . probably because it's been in a solid uptrend since 4/2003 when the study began. MCD also has a great consecutive losers number (2). The QS and IWM records are repeats of previous 3/7 posts, but I wanted to look at some other indices within that context.
Of the ETFs profiled, I prefer the IWM, just because of the $ return relative to the cost of the underlying. I'm still uncomfortable with the size of the avg losing trade and max intraday dawdown, and intend to hone in on better drawdown control for future posts.

The monthly chart of EWC (Canada) looks very similar to MCD for the 2003-2008 test period and given the relative net prices of MCD and EWC, the performance results are comparable.
It would be interesting to run a screen of the major 50 ETFs using the 3/7 system criteria and then trade the top 5 or 10 performers as a basket. I suspect the entry points would be fairly close given the results of some other systems I've tested here. Applying a breakeven floor stop and a trailing % ATR stop should cull out the weaker components of the basket, with all exits capped at 7 days. The screen should also be rolling, run monthly and upgrading the basket to only include the top performers.
OK, who's up to that task?

Wednesday, August 27, 2008

3 Day Low code clarification

I want to correct a miss-statement I made in the original 3 Day Low code post.
I indicated that
If Close =LowestFC(close, Len1)
returns the lowest low over the period Len 1. That's incorrect.
The commands returns the lowest close over the period Len1.
If Close =LowestFC(low, Len1)
returns the lowest low over period Len1.
My goal was to return the lowest close, not the lowest low, so the code I posted was what I had intended, I just botched the explanation of what I was trying to accomplish.
Sorry for any confusion to those trying to transpose into alternate platform language.

3 Day Lows - Part 2

As promised yesterday, these are the results of the 3 Day Low system for the Qs.
The upper record is performance without a stop, the lower records includes a $10/100 share Breakeven Floor stop. The frequency of trades is strikingly similar to the IWM profiled yesterday, and when optimized, 7 days pops out as the best fixed exit, just like the IWM. Does this suggest that the major indices tend to trade lockstep, or something deeper? I'm still working on that one.
While overall returns are not as great as IWM, we've got to remember that the Qs are trading at 46 and the IWM at 72. Five years ago, when the study began, the Qs were 26 and the IWM 38, so there's a bit of a skew in underlying price to consider. Once again, max consecutive losers is 3.
One difference between IWM and Qs performance is the Qs lack of gain using the stop. This is a bit surprising and I'm open to suggestions on possible reasons.
While I was at it, I decided to run the 3 day low on the XLE and NEM, to test the robustness of the system. Below are results for XLE. NEM %s were very similar to the XLE so I didn't post those records. Although 8 days pops up in the optimizes fixed exit, 7 days is almost identical, so no big discrepancy there. Again, a similar frequency of trades, max consecutive losers and % profitable when compared to the IWM and Qs.
Upper record is without stop, lower record is with $25/100 share Breakeven stop. This is where the system really falls apart. . . both on the XLE and NEM (not shown). % profitable drops to 30% range for XLE and NEM. So here's a case where stops (or at least this type of stop) are to be avoided.
Like many of my studies, this is a work in progress and I'll post updates as I uncover them. In the meantime, while the 3 day low system appears to have some legs and the ability to provide a viable income stream, there's a few wrinkles on the risk management side that need further work.

Tuesday, August 26, 2008

Camp Pendleton Golf

Sorry to get off point.
What's this got to do with trading? Nothing. . . except one of the perks of successful trading is the ability to play some top notch courses, which tend to be pricey. Well, if you're ever in Southern California and are thinking about Torrey Pines, La Costa, Aviara, The Crossings, etc,. save yourself $100 to $150 and play the Marine Memorial Golf Course in Oceanside. Greens fees are $28 and a cart's a few bux more but I like to carry my bag and walk it. Some amazing views and it's kept in absolutely top notch condition. Reserved for ex and current military Friday - Sunday, civilians are welcome Monday - Thursday. 20 minutes East of Oceanside, this gem is completely overlooked, always uncrowded and a golfer's delight. It's actually in the middle of Camp Pendleton, so you have to go through military screening to get on, but it's probably the only golf course you'll ever play where attack helicopters routinely swoop by, tanks can be seen on maneuvers in the distance and 50 cal. machine gun fire and mortar rounds are frequently heard from the firing range a few miles away. Give me a call if you're in town. Let's play a round. I've got a spare set of Callaway's.
Oh yeah, Mulligan's Restaurant (clever name, huh?) is staffed by Marine cooks (they don't call them chefs, Sir!) who will knock you socks off with a variety of items fit for a general and cheaper than MCD.

3 Day Lows & the Power of Stops

One characteristic of short term daily trading systems is that they tend to be hyper volatile, displaying considerable market "noise" in between those times when short term trends are played out. My buddy Clueless was playing with a 3 day low system the other day and (being the short term trader I am) this gave me some ideas for further exploration.
For today's test we'll look at the IWM.
Tomorrow, the Qs will become the focus of attention in an effort to identify a possible trading edge in what you trade short term. Other ETFs may also be profiled and, as always, you're encouraged to run this and other studies on your trading basket and post any results, pro or con.
My code is a little different than Clueless, as I've used the LowestFC function (Lowest returns the same values), which returns the lowest low over "n" days. . .in this case, 3.

The difference in the two scenarios is that the while the code commands are identical, a breakeven floor stop of $40 has been added to the lower study. The results are significant.
Although the stop model trades with 36% greater frequency, the ROI over the test period increases by 30% based on a similar gross profit. The number of consecutive losers remains the same (3), while the average hold time is knocked down 1 day as a result of the stop exits.
I've used a 7 day fixed exit, which tests out as a fairly reliable signal over a variety of time periods. There are many other exit strategies that could have been used and I always welcome reader input in that area.

TS2000i code is shown below.
The $40 breakeven floor stop needs to be added through the Strategy Builder.

Inputs: Len1(3), Len2(7);
If Close = LowestFC(Close, Len1)

Then Buy This Bar at Close;
If BarsSinceEntry = Len2
Then Exitlong This Bar at Close;

Monday, August 25, 2008

The Perils of Curve Fitting

First of all, a warm Thank You for the comments and e-mails and coding posts that followed Occam's Razor and the 3 Finger Lead. It's nice to know that other traders are thinking about these ideas and devising tactics to incorporate them into their trading.
George made a comment about curve fitting that I think is particularly apt. Anybody that's attempted to develop code runs up against this sooner or later and it basically has to do with creating a false probability scenario based on over-optimizing the system variables in order to maximize performance (ROI). The more variables, the greater the possibility that curve fitting will occur.
There are a number of data testing models (and software programs) that can help reduce curve fitting errors. A common method, the walk forward, divides the symbol database into segments that are tested incrementally, usually from latest to most current. Depending on the size of the database (# of bars), I typically divide the database in half, run an optimization test on each half and then set the variables to an average value. I've also got an adaptive algorithm for most oscillators that I can insert in the code to smooth things out as time moves forward. Although 3 Fingers took me about 45 minutes to post, it took over 20 hours of my time to develop, refine, test, refine, retest, refine, retest, etc..... Hey! . . . I'm old, things take a little longer.
Keep in mind that, as a daytrader, I use these system to build a consensus of momentum and to gauge probability of the daily cycle. Studies like Expiration, Cheaphooker and Monthly End Tickler are date based systems and I may take multi-day positions on these, if all the signals align.
I tend to think of these systems not with the danger of curve fitting, but with the advantage of reverse engineering. At the same time I'm always mindful of the markets' tendency to mean reversion (per my 3 Linear Regression studies) and although the markets may make significant trend moves, there will always be some retracements back to the mean (or below) along the way.
I posted 3 Finger Lead as a jumping off point for further trend following studies and will make an effort to identify possible curve fitting dangers in the system logic for future permutations. This blog is a work in progress, and those who have followed my twisted path over the past year have seen the theme and focus of the posts change considerably. I hope to get in a few more burps before I'm done.
Anyone wanting to pursue system trading ideas further can check out, a site I have mentioned several times before and for which I have the highest respect, but no connection. A lot of free stuff here, although for committed systems traders, and would-be auto traders, the magazine is the value of the century. Check out the top 10 systems. . . some of these have been making consistent money for years, suggesting that curve fitting is probably not one of their characteristics.

Friday, August 22, 2008

3 Finger Lead

The 3 Finger Lead (3FL) is a departure from most of my other studies.
First of all, it's a trend following system that seeks to Buy strength in the direction of the trend. No contrarian thinking here, we're just going with the flow and looking to positive momentum in the indices to guide our trades in other ETFs (and stocks).
The study was inspired by an old TS Dow theory study, but I've noodled around with the parameters significantly enough that the original premises are unrecognizable.
The 3FL is also packaged as a "kit of parts" and I plan to play with this thing over the next few weeks in an effort to refine some of those parts and enhance the applicability of the system.
The basic kit component of the system is the "condition" clause and I've offered a couple examples here to kick off the study.
I've arbitrarily chosen EWC (Canada) as the focus ETF and used the big indices DIA, SPY and IWM as the indicators of market momentum. You can test all sorts of stock and ETF combinations and you might be surprised at the versatility of the model.
The system is coded in TS2000i and uses 4 data fields. In TS this is easy to setup, as you simply insert data 2,3 and 4 in the basic chart (Data 1). I have no idea how this is accomplished in various other platform languages, but maybe some of the coding wizzes who visit this blog can help out.
The first thing that jumps out at you on the chart is probably the alignment of the DIA, SPY and IWM. Hard to believe you're looking at three different indices, but there it is. I chose to profile the EWC because it's acted fairly strong in otherwise faltering markets. There are many ways to play this setup. You don't have to use 4 data fields, you can cut it to 3 with a couple quick code edits, and the basic coding can also be used to evaluate possible pairs trades.
Based on our 5 year test period, the system trades an average once/month and delivers fairly impressive results. This version only trades long, although an inverse version will be reviewed in future posts. 52 winners out of 64 trades and only 2 consecutive losers (you know I like that), and with no stops in place the max intraday drawdown is only $310 and the holding time is fixed at 9 days. This is the type of trade to scale in on, although pyramiding has not been turned on.
There are a lot of tactical possibilities tucked away in this system. . .we'll explore a few them in subsequent studies.
I'll just post the code for now, with a line by line explanation to follow next week, if any confusion.
Basically, we're looking for higher closes in the 3 indices, while Data1 is showing a level of strength by holding above a moving average (Len1). Once higher closes in the 3 indices hold for a period of time (Check(10)), a Buy order is triggered.
The Data fields are then reset to zero to avoid false buy triggers.
Finally, the system simply exits on the 9th day of the position.

Inputs: Len1(38), Len2(12), Len3(9), Check(10);
Variables: Dat(0), Dat2(0), Dat3(0), Dat4(0);

Condition1 = Close Data1 > Average(Close Data1, Len1);
Condition2 = BarsSinceEntry = Len3;

If Condition1 AND Dat = 0 Then Dat = 1;
If Dat <> 0 AND Dat <= Check Then Begin
If Close Data2 > Highest(Close Data2, Len2)[1] Then Dat2 = 1;
If Close Data3 > Highest(Close Data3, Len2)[1] Then Dat3 = 1;
If Close Data4 > Highest(Close Data4, Len2)[1] Then Dat4 = 1;
Dat = Dat + 1;
Dat = 0;

If Dat <> 0 AND Dat2 + Dat3 + Dat4 = 3
Then Begin
Buy This Bar at Close;
Dat2 = 0;
Dat3 = 0;
Dat4 = 0;
Dat = 0;
If Condition2 Then ExitLong This Bar at Close;

Thursday, August 21, 2008

Occam's Razor

Over the course of the past few weeks as the Basket of Systems components have been introduced I've received a number of emails from skeptics claiming that the systems can have little practical value as they are so simple in concept and coding.
I beg to differ.
There's an ancient approach to reasoning called Occam's Razor, which suggests that, all things being equal, the simplest approach to solving a problem . . . typically the one requiring the fewest steps . . . is the best one. Having run the gamut of trading very complex to very simple systems over the past 20 years, I'm definitely in the camp of the later.
If you've got some time on your hands, watching 2 minute bars and waiting for the daily RSI to reach oversold levels, you might want to amuse yourself at the following link:
About 10 years ago INTC was the poster child for technical signal alignment, and every TradeStation system you could think of using INTC made money. 2 higher high daily closes on increasing volume = BUY. Hold till you got a 2 bar reversal, then exit. It was like printing money. But those easy money days are gone. Order flow masking, algorithmic program trading, backdoor order flow conduits like Pipeline, Executioner and a slew of other "smart execution" programs have all made trading a lot riskier.
Last night I spent a few hours with Don Bright and some of his traders just talking about trading and looking at some of the ways they trade. Now I've known Don for about 8 years, have visited their Las Vegas office and have the highest regard for their integrity and savvy. They've been traders for 40 years and have run Bright Trading as a prop shop since 92. They currently have about 500 traders, local and remote, and that's a lot. On a average day Open, they're queued with between 30 and 50 million shares of orders. WOW. . .that's a lot. Their approach is focused on NYSE stocks, simple, basically threefold and they like to be flat at the end of the day:
1. Mean reversion to projected fair value from envelop variations at the open (set a high and low limit and trade against it with Opening Only orders).
2. MOC (market on close imbalances), using orders which trade with the imbalance momentum.
3. Pairs trades of various types
Of course, they've got very sophisticated software that executes all three type of trades on an auto trade basis, but many of their traders still opt for manual execution of pairs trades.
Now, this is not an endorsement or solicitation for Bright, I'm just sharing a conversation that you didn't get to hear, and I think there's more than a few nuggets of wisdom there.
Don's number one caution for traders. . ."Don't overcomplicate".
In the comments a few days ago Muhammad suggested using a 1/3ATR(10) stop for intraday trades. I don't know if he picked that up from Bright, but it's one of their favorites and you might want to test it with your own fantasy trading.
One interesting vignette (to me) was a report from a trader who typically trades pairs, 2000 share lots, with average 7 trades/day. He has a buddy, trading the same pairs, 200 share lots, with an average of 15 trades/day. The buddy's account equity is slightly higher.
Although their performance records only extend back 4 months, the argument favoring smaller trade size to manage risk/reward certainly looks promising. Bright Traders pull nickels, dimes and occasionally, quarters, out of the market on each trade: just a little reality check for those who think that a successful trade has to be measured in 50 cent increments.
For any potential prop shop traders, the link to Bright is noted above. They've got a 3 day "get to know Bright Trading" program and a 2 week boot camp if you want to get serious. Fees are VERY reasonable. Since their traders have professional status, there are tax implications and you need to get a series 7 license (think about 100 hours of prep), which they will facilitate, as much as possible.

Wednesday, August 20, 2008

Rewards of Risk - Expiration Friday

This post continues Monday's theme, but is based on a different concept.
Today's system capitalizes on a tendency of the IWM to surge after expiration Friday and the goal is to capture a short term gain without exposing the account to excessive risk.
The chart uses the TS "paint" function to display expiration days as white vertical oblong bars and the blue line is the 6 DSMA.
Two variations of the system are profiled.
The first system enters long the day before expiration if the close on that day is greater than the 6 DSMA. The system exits 10 days later. There is a stop loss and a breakeven floor stop . . .both set at $300 per 100 shares of the position. A percent stop is probably the more effcicient way to format the stop as the trade log extends for 5 years and the since IWM was in the 30's in 2003, the returns are a bit skewed. Somthing for you to work on.
The second system is ditto the first, but without the conditional MA filter. Same stops. . same fixed exit.

The MA filter cuts the number of total trades in half, as well as the total return. With current stops in place, the only significant risk gain by utilizing the MA filter is a reduction in max intraday drawdown. The MA filter system has (surprisingly) fewer consecutive losers, a nice feature that balances the marginal loss of overall system efficiency. Worth a closer look for you code tweakers.

Again, I use these systems to gauge short term market momentum as I daytrade 5 and 10 minute bars, although I will occasionally put on a longer term 5-10 day trade to capture clearly trending markets.

TS 2000i is shown below. From now on I'll be putting code at the end of the post. Some issues with blogger create some weird problems when you use the <> in the middle of a post and then try to narrate on. In some posts, it's taken me up to an hour to fix the problem and I inevitably lose whole sections of the narrartive that I have to recreate. To avoid that frustration in the future, code will be at the end.
With MA Filter:
Inputs: Len1(1), Len2(6), Len3(10);
If Next3rdFriday(1) = Len1 and Close > Average(Close,Len2)
Then Buy This Bar at Close;
If BarsSinceEntry = Len3
Then ExitLong This Bar at Close;
Without Filter:
Inputs: Len1(1), Len3(10);
If Next3rdFriday(1) = Len1
Then Buy This Bar at Close;
If BarsSinceEntry = Len3
Then ExitLong This Bar at Close;

Tuesday, August 19, 2008

IWM basket update

I probably should have called yesterday's post the "rewards of risk", rather than the "price of risk", but as a guy who's always got one eye on the exit door in these volatile markets, the later seemed more appropriate.
It's been a while since I updated the fractal trading model using Elder's 1:6 time ratio, so this is a short term performance check. Recall that this is part of my BASKET OF SYSTEMS approach and this vignette examines 4 oscillators (RSI, Stochastics, StochasticsRSI and %R, long and short) tested on 500 bars on 10& 60 minute and daily bars.
Parameters of each system are defined in the name of the system, although (depending on your platform) the %R indicator is often formatted as a - value.
No stops are applied to the current test model but, as shown in previous posts, a simple 3% stop loss can drop the negative open P&L significantly.
My basic goal to achieve a higher return than buy and hold, and to protect those returns continues to hold with this update. The big gains are, as expected, with the daily bars but, when considered in relationship to risk reward /time, the 10 minute trading approach becomes more attractive. My MO continues to focus on daytrades (5 and 10 minute bars) while utilizing the larger fractal time frames to gauge the probability of short term momentum and to identify likely cycle pivots.
For newer viewers of the blog, the system testing posts over the past few months are part of a larger program to develop a trading model which includes both a basket of systems and a basket of time in order to manage risk.
One of the themes I've mentioned several times focuses on "what to trade". While many traders utilize a variety of scanning tools to define leaders & laggards in RS, momentum, volume, breakouts, etc., etc., my trading is almost exclusively limited to the Qs and IWM. While scanning can yield dramatic returns, my goal is simply to generate a relatively predictable (always a dangerous word when trading) revenue stream with muted risk . . . and the basket of systems and time is one way to accomplish that end.
Since I started running this month's system series on the IWM I've received numerous emails from traders telling me how impressed they are with the IWM's technical alignment properties. Join the club. And I have to be amused by my buddy the Clueless Q Trader, who's now morphed himself into the Clueless IWM Trader. Since my trading vehicle of choice is options, the relatively recent switch to penny spreads on most strikes, combined with a robust open interest 5 strikes in either direction of the ATMs provides some very attractive spread position opportunities in the IWM.
Worth a closer look IMHO.

Monday, August 18, 2008

The Price of Risk

Inputs: RSILength(2), OverSold(28), Overbought(86), Oversold2(20), Overbought2(86), CCILen(8), OverSold3(21), OverBought3(100), OverSold4(23), OverBought4(100);
If RSI(Close, RSILength) Crosses Below Overbought

and CCI(CCILen) Crosses Below Overbought2
Then Sell This Bar on Close;
If RSI(Close, RSILength) < Oversold
and CCI(CCILen) < Oversold2
Then ExitShort on Close;
If RSI(Close, RSILength) Crosses Above OverSold3

and CCI(CCILen) Crosses Above OverSold4
Then Buy at Market;
If RSI(Close, RSILength) > OverBought3
and CCI(CCILen) > OverBought4
Then Exitlong at Market;

Inputs: RSILength(2), OverSold(32), Overbought(90), Oversold2(32), Overbought2(98),CCILen(8), OverSold3(32), OverBought3(78), OverSold4(32), OverBought4(86);
If Currentbar > 1 AND RSI(Close, RSILength) > Overbought

and CCI(CCILen) > Overbought2
Then Sell This Bar on Close;
If RSI(Close, RSILength) < Oversold
and CCI(CCILen) < Oversold2
Then ExitShort at Close;
If Currentbar > 1 AND RSI(Close, RSILength) < Oversold 3
and CCI(CCILen) < Oversold 4
Then Buy This Bar on Close;
If RSI(Close, RSILength) > OverBought3
and CCI(CCILen) > OverBought4
Then Exitlong at Market;

I recently profiled a system I called the Grand Slam Cross (GSC) which was based on the CROSS OVER (cross back over) of overbought and oversold CCI and RSI levels. IMHO the system had a number if attractive features including a monthly frequency, relatively muted max intraday drawdown and a geat winners/losers ratio, especially the consecutive ones, which tend to make most traders waffle about the reliability of the system on anything above 3.
As I was fiddling around with the code, I tested several variations of the inputs in an attempt to goose the overall return. This is the result.

While the GSC generated respectable returns, the second system . . Grand Slam 2 (GS2), uses the same thinking but executes on the threshold of overbought and oversold levels. The Input values are optimized for the GS2 and, as expected, trigger at different levels since they are looking for the initial cross rather than the cross back. Triggers on the immediate threshold cross typically leave some money on the table as momentum is often not yet exhausted at the cross. That being said, the GS2 system puts that thinking to the test as it reflects over twice the return for the IWM over the same test period.GS2 has 3 times as many trades and the winners/losers (including consecutive losers) is still acceptable. However, what you buy with the GS2 system is the added max intraday drawdown and an increased size of the losing trades.

As usual, I have not applied any stops to this little test and, based on the results of previous studies profiled here, a breakeven floor stop or a simple stop loss should decrease that intraday drawdown and increase the bottom line.

Friday, August 15, 2008

Month End Tickler

Ok, here it is. THE HOLY GRAIL. My work is done. I can retire. It doesn't get much better than this. You're only in the market 6 or 8 days a month, so your exposure to low flying Black Swans in minimal. And, you don't need a stop. And, you don't even need a computer. . .a calender will work just fine.
The trade concept is based on carry over momentum at the end of month and was inspired by an article by Thom Hartle in this month's (Sept) ACTIVE TRADER magazine in which he explored tactics to optimize returns of the best performing ETFs at the EOM. Being the tweaker I am, I completely ignored his extensive statistical analysis and simply added a conditional MA support/resistance confirmation for the trigger. . . which improves performance dramatically.
Simple is as simple does for me, and being basically lazy, I just want to play this thing on my beloved IWM and Qs.
Feel free to run it on other ETFs and indices and post the results to the comments.
The system simply buys on the 28th day of the month if the close is above the 15 DSMA and sells 6 days later. . .OR the system sells short on the 26th day of the month if the DSMA is above 13 and then sells 8 days later.
I've highlighted the "above" criterion because this is where the twisted logic of the market comes in. You'd expect that to read "below", reflecting the prospect of selling weakness, but it doesn't work out that way. If you change the signal from > to < you still get 100% success, but leave $1000 on the table. Here's a case where selling strength works best for the Shorts.

Inputs: Len1(15), Len2(6), Len3(13), Len4(8);
If DayofMonth(Date)= 28 and Close > Average(Close,Len1)

Then Buy This Bar at Close;
If BarsSinceEntry = Len2
Then Exitlong This Bar at Close;
If DayofMonth(Date)= 26 and Close > Average(Close,Len3)

Then Sell This Bar at Close;
If BarsSinceEntry = Len4
Then ExitShort This Bar at Close;

Thursday, August 14, 2008

Two High Reverse. . .with a Twist

The chart above was added after the initial post as a clarification of how the 'pyramid entry" and fixed day exit look.

Rob Hanna had a post Tuesday on what's happend with the SPX after 2 days up for the past few months. Being a shameless copycat, I decided to look at performance results for that concept on the IWM over the past 12 months. As I've mentioned before, buying short term weakness is my preferred mode, but this is an example of how selling strength can also produce handsome gains.
Here's the TS2000i code for your viewing enjoyment.

Now Rob sells these code packages, but he does so using TS8.3, which is a little bit different from 2000i, so I hope his potential loss of revenue from my posting this code won't mean he has to settle for that 60 foot yacht instead of the 75 footer he really wanted.
(Rob is actually a really nice guy who's got an enquiring mind and is more than willing to share his extensive trading and backtesting history.)

Inputs: Len1(9);
If Close > High[1] and High[1] > High[2]
Then Sell This Bar at Close;
If BarsSinceEntry = Len1
Then ExitShort This Bar at Close;

As usual, I've put my little twist on things and required the entry trigger to reflect 2 consecutive higher high closes.
Exit is a fixed length. . .9 days. You can test other exits at your convenience.
And for something completely different, I've turned on the "entry pyramid" function so the system entry can trigger again within the 9 day trade period, while still exiting on the original 9th day. Using the pyramid entry almost doubles the number of trades for the year and also doubles the net return, so it works very well in this setup.
24 trades in 12 months = avg 1 every 2 weeks. . .and with and avg holding time of 7 days, this is an active system for short timers.

Wednesday, August 13, 2008

Variations of the 6 Day Low

Inputs: Len1(6), Len2(19), Len3(64), len4(80);
If Close = LowestFC(Close, Len1)
Then Buy This Bar at Close;
If Close Crosses Above Average(close,Len2)
Or LinearRegValue(Close, Len3, 0) > Len4
Then Exitlong This Bar at Close;
Here's another approach to the 6 Day Low exit in lieu of a fixed number of days. It's based on a 3 prong approach using a MA moving average crossover, a change in the Linear Regression value (not slope or angle) and a Breakeven Floor stop (BFS) of $155 per 100 shares of the position.
While this system produces less net return that the fixed exit, the winner/loser ratio is considerably improved and the total number of trades is reduced. Holding time is reduced by a total of 24 days and average holding time per trade is 5 days so risk exposure is reduced by 1 day. . . Hey! . . . a lot can happen in 1 day.
This is just another component of the BASKET OF SYSTEMS concepts I've mentioned several times. Eventually, I'll morph the Grand Slam Cheaphooker CCI RSI %R 10 Day Low 816 CrossOver System into a workable trading model that will predict market moves with NASA precision. Until then, feel free to fiddle with the code and adapt to your own trading style and goals.

Tuesday, August 12, 2008

SoCal Traders

For those of you who live in Southern California and have ever wanted to know about the inner workings of a prop shop or chat with one of the top prop shop principals, here's your chance.
Colleagues in Trading is a Tustin based non-profit trader support group ( I was on the BOD for several years) that provides speakers, eductatonal and training programs, etc.
Next week, Don Bright of Bright Brothers Trading will be in town in 3 different locations SD to LA for several events, some paid, some free. I visited their Las Vegas training/trading facility a few years back and was on the edge of signing up , when the other member of this household opted for the more balmy environs of SoCal. IMHO they are a class act and utterly above board. Check out the colleagues site, click on Evening with Bright Trading and register to attend one the free evening chats for a peek at what it's all about.

Monday, August 11, 2008

Buy 6 Day Low, Exit In 7 Days

This is a little departure from the Buy the 10 Day Low system I looked at last week. What's impressive about this system is the total ROI for the 5 year test period relative to the previous 10 day systems tested, while incuring no more downside risk.
As the title says, this system buys the 6 day low and sells at the close of the 7th day. You don't even need a computer to figure this one out.
The system also includes a TS Breakeven stop ExitLong of $95 for every 100 shares, and this gooses the ROI by $600, so it's worth including. The stop is a default ADD in the TS strategy builder and can be turned on or off with a click.
TS users can set the SHOW ME function for 6 day lows (or 8 or 9 day lows for the 10 day system), monitor 30 minutes pre-close and enter a MOC order if you don't want to work the trade.
TS2000i code below:

Inputs: Len1(6), Len2(7);
If Close = LowestFC(Close, Len1)

Then Buy This Bar at Close;
If BarsSinceEntry = Len2
Then Exitlong This Bar at Close;

Saturday, August 09, 2008

Qs Weekly Update

Qs are the clear winner this week: up $2.44 or 5.4%. DIA up 3.4%, SPY up 2.5% and IWM up 2.4%. After nearly touching our 44 level support on Monday, Tuesday's positive action was the precursor for strength into Friday's close.
The Qs have now effectively "Kissed the channel good bye", suggesting an impending change in channel slope and a continued run up.
Checking the monthly bars 3LRs study, we can see how the lower LR30 channel has acted as long term support for the Qs for the past 4 years and the lower panel technical readings are looking bullish for the near term.
At the same time, the Qs are approaching short term overbought levels, having come a long ways in a relative short time. Therefore, expecting either a consolidation at these levels for a few bars, or a modest retracement going into expiration week.
The only non-confirming bullish technical signal is volume, which continues to run below both the 10 and 20 MAs. These numbers may be skewed by the hyper volume of late June and early July when the summer swoon was in full motion, so I'm mentioning it, but not placing a lot of emphasis on it.
I'm still working on backtesting the A50 and A200, so no updates this week until that little project is complete.
I was diverted from several of my goals this week as I tested various Buy the 10 Day Low scenarios. . . a decision I don't regret. Although my bias is CLEARLY in favor of daytrading the pivots and fading the gaps, systems that offer a testable edge like the 10 Day Low are very attractive probability plays to capture some short term (5-10 day) gains.
I've got 2 new versions of the 10 Day Low system that look very promising and I'll post those next week. I'm trying to keep the code very simple so that those using other platforms can code it in without much effort. Perhaps surprisingly, I have found that the simplest systems are often the most robust indicators of market momentum, which is the way I typically use them.

The XLF is also showing signs of life, perhaps in the wake of surviving earnings season and the lack of any more significant bank failures (s0 far). The was no doubt a lot of short covering going on Friday and the collapse in the last 15 minutes on the XLF was indicative of the underlying weakness that's still festering there. Thinking about short the XLF and long the IWM/Qs for the near term, just to keep things in balance. My Qs SEPT 45 butterfly play hasn't turned out that great, but risk is fixed so I'm not THAT concerned.

I'll post more on the butterfly spread next week if anyone's interested. It's a nice little premium decay setup with limited risk and the potential for a nice revenue stream if the markets don't get too volatile going into the fall . . . which is just wishful thinking on my part, and has no statistical basis.

In case you missed it, Brett has a link to a new prop shop blog that will provide a little reality check about how these firms think and trade. Some insightful tips.

Friday, August 08, 2008

Pivot Envy

Three charts above are IWM, NYAD (NYSE advance/decline) and Qs on 2 minute bars.
The intersting thing here is the action of the NYAD relative to the IWM and the Qs. Price action in the ETFs is rather ambiguous about whether this rally is bound for failure, but the NYAD gives a clear signal of strength going into the last 15 minutes of the 11:00 hour.
Also supporting the bullish case is the fact that the IWMs have been bumping against the R2 pivot for the past 90 minutes. while the Qs have yet to touch that resistance level. With the NYAD on a upslope at 11:45, the probability of the Qs hitting R2 is greatly increased and a bullish position on the Qs becomes the tactical short term (scalping) play.

Here's an update of the above charts (minus the NYAD) and now in 5 minute bars so you can appreciate the commonality of the markets. The lower panel technicals are virtually identical as the markets move in lockstep. The lag in the Qs has now been eliminated with the pop to R2 mirroring the IWM. The breakout off R2 and the subsequent pullback in the first 20 minutes of 13:00 are further indications of the glue that holds this pair together and the arbitrage opportunities when divergences appear.

Thursday, August 07, 2008

10 Day Low, Double Exit

I continue to tinker with the Buy the 10 Day Low System, and have found several ways to increase overall return wih no added risk. The simplest way is to add multiple exit triggers. . .in this case the original MA cross is now supplemented with a % R overbought exit trigger as an either/or command.
TS 2000i code shown below:

Inputs: PercentRLen(7), Len1(8), Len2(19), Overbought(95);
If Close = LowestFC(Close, Len1)
Then Buy This Bar at Close;
If Close crosses Above Average(close,Len2)
Or PercentR(PercentRLen) > OverBought
Then Exitlong This Bar at Close;

Total number of trades increases7%, while trade gain over the 5 year test period increases 20%. Drawdown exposure remains the same.
This is just an incremental adjustment to the 1o day low system. There are substantial refinements to the system's risk management that can be added without comprising the elegant simplicity of the concept and I'll review some of these in the system updates next week, including a linear regression stop inspired by a comment from Sysin.
Corey has a GREAT post today updating the success of various DIA gap fades.
He updates the database on a monthly basis and provides a thought-provoking array of performance data that's adaptable as a risk/management tool.
Definitely worth a close look.

Wednesday, August 06, 2008

Buy the 10 Day Low

The Clueless One asked about a system that bought the 10 day low and sold on the cross of the 20 DSMA. This is a long only system and contains no risk management stops. I'll play with this thing a bit more as the drawdown is a bit scary and can probably be scaled back considerably with either an ATR stop or a simple stop loss. It's on my "to do" list.
For now, here's the very simple code in TS2000i, with the usual caveats:

Inputs: Len1(10), Len2(20);
If Close = LowestFC(Close, Len1) Then Buy This Bar at Close;

If Close crosses Above Average(close,Len2) Then ExitLong This Bar at Close;
You can easily expand the code to include a short side component, but as noted below, that's contrary to the goals underlying the system.
I"ve also found that bullish entry signals are best executed with This Bar at Close commands, rather than At Market commands, which push execution of the trade into the next opening bar. Ditto for exit signals as with an impending reversal, the next opening is likely to gap down. The equity curve is also a bit rough when compared to the recent %R system. If we add additional entry conditions, we can probably smooth it out a bit without sacrificing too much of the gain. This system capitalizes on Larry Connor's backtesting model which verifies that the best risk management strategy over the long haul has been to simply buy weakness . . in this case 10 day lows.
Since I'm forever tinkering with these things, I optimized the system and found these results using 8 day lows and a 19 MA cross. The equity gain is definitely improved based on a similar number of trades over the 5 year test period with a slight decrease in drawdown but, again, no risk management stops are engaged.
While I enjoy being the driver for these studies, at some point in time the passengers have to assume some participatory responsibility (for example , running these systems in 10 and 60 minute bars and then posting the results). Failing that, I will likely discontinue future system studies and probably close the blog. My technical daytrading strategy is detailed in the How I Trade panel on the right of the blog, along with numerous linked examples. I find little value in repeating posts of the the same setups day after day . . . so, unless there's a clear cut technical lesson to be learned from the day's action, those posts will be few and far between. Since 90% of my trades are based on IWM and the Qs, I don't offer any great stock scans or screening tools, although I may occasionally profile an unusual stock situation.
Contrary to some other blogs, I don't carry ads, I don't collect revenue from links to other blogs and I don't sell CDs, books or study courses. I wouldn't buy 95% of the stuff run through google ads, etc., and I believe it's a shameful dis-service to other traders to suggest there's any value in many of the rather preposterous claims on these sites.
I have yet to perfect the BZBTrader Rags to Riches, Pot of Gold, End of The Rainbow, Can't Possibly Lose, Top Gun, Become a Millionaire While You Sleep Trading System. When I do. . .you'll be the first to know.
I do mentor traders on a one to one basis, but you've got to come to Oceanside and spend a couple days and a couple thousand and I only do that 4 times a year for qualified traders (this is not a solicitation).
Dr. Brett posted a nugget some time ago that should be a guide for your trader education and survival:
"If you're the smartest person in your group, you're in the wrong group."
Easily stated but difficult to implement. . . separating the wheat from the chaff is the hard part.
Beware the Golden Goose and Good Luck out there.

Tuesday, August 05, 2008

Williams %R trading model

This system uses the Willams %R as its foundation. As with the Grand Slam systems profiled last week, I've used a double condition entry, in this case the %R and RSI. . .both must cross overbought/oversold levels in order to trigger. Also different for this test, the exits are based on crosses also instead of thresholds, as with the earlier Grand Slam models.
I tested both the %R and RSI as the exit indicator and determined there is no edge offered by either one. For purposes of this post the RSI is shown. as noted in previous posts, I favor using these systems to merely gauge cycle momentum of IWM and to employ options strategies as the actual means to capture gains.
Per previous posts, code for the system is provided in TS2000i format.
Tip of the hat to Sysin for noting verbiage corrections for TS8.3 in Friday's post.
Inputs: RSILength(2), PercentRLen(7), OverSold(20), Overbought(95), Oversold2(18), Overbought2(87), Oversold3(20), Overbought3(95);

If Currentbar > 1 AND PercentR(PercentRLen) Crosses Below Overbought
and RSI(Close, RSILength) Crosses Below Overbought2
Then Sell at Close;

If RSI(Close, RSILength) Crosses Above OverSold3 Then ExitShort on Close;

If Currentbar > 1 AND PercentR(PercentRLen) Crosses Above OverSold
and RSI(Close, RSILength) Crosses Above Oversold2
Then Buy Next Bar at Market;

If RSI(Close, RSILength) Crosses Below OverBought3 Then Exitlong at Market;

The %R system concludes my study of simple oscillators. As mentioned yesterday in reference to George Pruitt's article, I will shortly offer up a few studies of the IWM based on criteria non-correlated with most oscillators.

Sysin mentioned off line that the great results obtained with the Grand Slams in IWM were not attainable in his tests of the Qs. This is as expected and I have previously mentioned that the IWM reflects a performance response to technical trading systems that is superior to the Qs, SPY and DIA.

I'm tempted to abandon Qs trading and just focus on IWM, which responds to the pivots, the MAs and the parabolics just as well, or better than the Qs. But, Hey! 2 heads are better than one and IMHO the Q options still offer relatively easy daytrading
returns, which is how I work it.

Monday, August 04, 2008

SFO August

This month's SFO is areal bonanza for systems traders and features several articles relevant to the systems testing I have been running on this site for the past 2 months. Corey also picked up this great issue and his comments are instructive regarding several of the other authors.

The article that was of particular interest to me was George Pruitt's MAKE YOUR SYSTEMS WORK IN TANDEM. In it, George makes the argument for using a basket of systems, a concept I advanced in last Tuesday's post. George, of course, is a lot smarter than I am and as a keystone of Futures Truth magazine, he's been a source of inspiration for my system trading for many years.
George makes the argument for using non-correlated systems in a trading basket, which was the theme I was going to explore this week, so my work is done here and I'm taking the rest of the week off.

Go to the SFO link above and sign up for a free subscription. Definitely worth the price.

Saturday, August 02, 2008

Qs Weekly Update

Qs down .39 or .86% for the week. DIA -.04%, SPY up .5% & IWM (once again leading the pack) up 1 %.
Viewing the daily and weekly bar 3 linear regression channel studies above, the consolidation at the 45 level that began in July is clearly evident. While the LR11 channel on the daily bars has displayed an upward slope for the past 3 weeks, the daily technicals are developing a negative tone, and the odds at this point favor the Qs at 44.
Both the A50 and A200 have reached substantial overhead resistance at the cross of the 200 and 50 DSMAs, and once again the technicals favor the short side.
Last weekend's overextended NAMO reading turned out to be a great tell for Monday's weakness, although we still have to run more backtest studies to confirm the NAMO's applicability as a longer term trend indicator. For now, it appears useful for pinpointing imminent short term reversals. . .whether it has greater utility than that remains to be seen.
My next systems testing goal is to run backtests on the A50, A200 and NAMO to assess their predictive power. My goal is not to develop specific trading models, but simply to determine whether it is useful to continue using them as momentum indicators.

Friday, August 01, 2008

Grand Slam Cross

For this week's final system test, I revised the Grand Slam system using both the RSI and CCI so that entries are based not on threshold signals but on crosses back under or over overbought and oversold levels. Subtle, but this change offers several performance improvements over the original system.

Most notable is the significant reduction in drawdown for both long and short trades. This is the most attractive feature of the system from my perspective.

Also highly attractive is the 85% success rate for both the longs and the shorts. . .a balance not typically encountered.

The total number of trades is substantially reduced down to 60, matching the frequency of the RSI and CCI cucca systems detailed Tuesday and Wednesday.

Holding time for long winners is almost tripled from the original grand slam period of 6 to the current study value of 17. This added risk exposure of 11 days is the price the sytem exacts for a trigger confirmation of both the RSI and CCI signals.
As noted in previous posts, I suggest using these daily studies to gauge current momentum bias and then deploying various option strategies to capture some equity.
IMHO, if performance results can be replicated on 5 or 10 minute bars, then daytrading the underlying equity offers a good risk/reward edge.

Per Sysin's request, TS2000i code is provided in text form to facilitate copying and pasting into your system:

Inputs: RSILength(2), OverSold(28), Overbought(86), Oversold2(20), Overbought2(86), CCILen(8), OverSold3(21), OverBought3(100), OverSold4(23), OverBought4(100);

If Currentbar > 1 AND RSI(Close, RSILength) Crosses Below Overbought
and CCI(CCILen) Crosses Below Overbought2
Then Sell This Bar on Close;

If RSI(Close, RSILength) < Oversold and CCI(CCILen) < Oversold2
Then ExitShort at Close;

If Currentbar > 1 AND RSI(Close, RSILength) Crosses Above Oversold3

and CCI(CCILen) Crosses Above Oversold4
Then Buy This Bar on Close;

If RSI(Close, RSILength) > OverBought3 and CCI(CCILen) > OverBought4
Then Exitlong at Market;