Saturday, March 07, 2009

Weekly Update

I know , I know. I said I wasn't going to tweak the weekly update charts any more, but after last week's MAMA and MACD studies I decided that this version reflects the impending momentum and reversal probabilities better.
I've deleted the VIX comparison overlay for now. There's no imminent signs of a near term cross and removing it allows me to pile on the MAMA study using a 3, 7 and 14 EMA.
I've also deleted the MLR6 study as few platforms allow you to create such an indicator without considerable programming, but I'm looking at alternate ways to display it without cluttering the larger price chart
I'm keeping the LR30 study overlay as I'll be publishing some studies on that down the line and I'll warn you ahead of time that it's a great tell.
The middle panel MACD periods have been revised to 4,16,5 per the MACD signal line study and I've added a 3,7 EMA of the MACD (not the price) to clarify signal crosses.
The lower panel has RSI(2) and Stochastics 10,2,2 indicators laid over the volume bars.

As feared last week, prices in 3 of my little ETF basket have effectively kissed the LR30 lower channel band goodbye this past week, and although all 4 ETFs are displaying some form of a doji or spinning top (normally suggesting the possibility of at least a short term reversal) a quick look back on the charts as to what happened the last few times this candle pattern set up should temper your enthusiasm for a rally.
The midpanel technicals suggest the Qs and XLE as the most likely candidates if a short term rally does materialize as they have formed little basing patterns while the IWM and XLF continue downslope.
Although I've been nibbling at GE, MSFT, and the Qs (hedged, of course) going into March expiration, I need a lot more positive technical signals before getting too enthusiastic about this market.
Finally, for anybody that's interested in becoming a prop trader, Bright Trading is having a number of get-to-know-us sessions around the country in the next 2 months. These guys are the real deal, having been at it for 30 years and I almost went to work for them 5 years ago, but decided Vegas wasn't my thing (you can traded remotely with them). A few hurdles to jump over (you need to get a series 7), but they know how to make money with really controlled risk. A tough act to follow (IMHO). I'm not a promoter for Bright and receive nothing for directing traffic that way . . . I just think this is a great free opportunity to kind of look under the sheets and see if this kind of trading appeals to you if you're around one of their session sites.

Friday, March 06, 2009

Meet the Qs MAMA

As I close in on finalizing the Qs Dirty Dozen components, this seemed like a good time to run a little reality check on another one of my favorite fractal indicators . . . a simple moving average crossover.
Of course, simple as as simple does (I think Forest Gump said that) so I've added my usual BZB twist to put some flesh on an otherwise boney system.
Right off you notice that I'm using the XAverage function, which is the TS exponential MA term, thereby skewing the weight of the average towards the most recent prices.
I've also deferred from using the EOD close, and have instead opted for using daily highs to track potential bullish signals, and the daily lows to track bearish signals. This little tweak improves performance considerably for those of you who want to play with this thing further.
I've used the cross below and cross above signals to trigger trades and have resorted to my fixed bar exits to get me out. Interestingly, the fixed exit on the shorts calcs out at 12, a bit longer than the 9 period we're use to seeing for Qs shorts but, in fact, the net difference between a 9 and 12 bar exit isn't that significant. More on that later.
The implications of this study are several:
First of all, as with Wednesday's MACD study, I'm going to revise my beloved 8/16 MA indicator to a 7/14 indicator and my 4/7 MA indicator to a 3/7 . Now this brings up another interesting point. . . as astute readers will notice that I've optimized different MA crosses for the long and short triggers. If you consider the momentum of the downtrend for the past 16 months, this makes sense intuitively. And, in like manner, the long fixed bar exits are shorter in duration than the shorts.

Like many of the systems I've studied recently the last couple trades defy the otherwise unbroken upslope equity curve.
No definitive explanation for this recent whammy, but I'm looking.

TS2000i code shown below with the usual caveats. . . these inputs are optimized for the Qs. . . since each stock/ETF has its own unique signature cycle you've got to do a little homework if you want to apply to your own portfolio. Hey!, I've already done the heavy lifting for you.

Wednesday, March 04, 2009

Qs MACD signal line

This is a bit of unfinished business for the construction of the Qs Dirty Dozen and a verification of the MACD signal line I've been using in my weekly update Telecharts. This is just one variation of the MACD possibilities. . . I'll look at zero line crossovers down the line to add a little kick to the equity curve.
For now, the study yields a couple interesting (to me) outcomes.
First, for daily bars, the optimized MACD settings (FOR THE Qs) are 4,16,5. I've been using a 3,14,3 for my daytrading and will tinker with these new settings to see how they align with my suite of favorite indicators including the parabolics and the 8/16 and 4/7 MA crosses.
Second, (ho hum . . . yawn) the fixed bar short cover is 9 days. How many systems do we have to test to verify this is great exit ???????

The equity curve looks pretty smooth until we get to the last 5 trades, suggesting that, like other systems such as the Qs SD Oscillator that have turned squirrely in the last month, there may be a change in market dynamics in the making. Not necessarily up, just a change.
TS200oi code is below. As I mentioned above, this iteration uses support/resistance crossovers. The zero line crossovers should yield less net return but a higher success rate. Yet to come.

Tuesday, March 03, 2009

Pivot Range Reversion


This post looks a lot like yesterday's. The difference here is that in the previous study we examined the PP and today we're looking at the R1-S1 range of the pivots to give us a clue about what the Qs are likely to do next. Once again the fixed exit bar is close to 9, and the net return on the account is very similar.
There appears to be no obvious edge in using the pivot range versus the PP itself as a forecasting tool, which is a bit surprising to me. Nevertheless, I'll continue to explore other variations on this theme for the remainder of the week just to satisfy my own curiosity.
I've used a number of variables (Vars) in the code as it helps to clarify what's going on a little better (IMHO) and avoids a lot of otherwise confusing parens.

Monday, March 02, 2009

Pivots Mean Reversion


Supporting my on-going research into the value of pivots for forecasting market direction, Cucca recently sent me a link to one of Henry Carstens pivot based trading systems. Cucca also posted the code for a little MeClellan based system (in comments section of his blog) that produces some impressive results.
Henry's pivot aproach is worth a look and I'll probably be deconstructing the system later in the week as I explore more pivot based mean regression systems. Henry doesn't explain exactly how "volatility" is defined, so I'll just jump in and offers some suggestions.
Today's offering is a variation of my earlier SD signal line study and simply looks at the value of the PP buffered by a lookback at a Len1 moving average of the PP and converted to a zero line value by dividing the resultant by the standard deviation of the range.
Later this week I'll look at the same theme using the R1-S1 pivot range as well as several other permutations.
If nothing else, this study again confirms the 9 day period as the most profitable for Qs fixed bar short exits (covers) once the system triggers.

Saturday, February 28, 2009

Weekly Update

Nothing stays the same so I've deployed a new weekly update format incorporating the 2 sets of ETF basket Telecharts I previously posted. The settings are as follows:
In the upper window of candlestick prices I've overlaid the MR6 (6 period moving linear regression channel) in white, the VIX in red and the 30,12,30 linear regression channel in orange.
The middle study pane includes the 5,20,3 MACD histogram in blue and 2 moving averages . . . 4 and 7 in blue and white.
The lower study window includes the RSI(2) and the Stochastics 10,2,2.
This new format provides a quicker view of the market pulse and still allows me to pick up butterfly candidates quickly.

The good news for market prognosticators this week was that both the bulls and the bears were correct (in the same day, several times).
The bad news is that an increasing number of stocks look like they're rolling over to the downside and are in danger of kissing the channel goodbye to the downside.

Next week I hope to complete the Qs dirty dozen studies and begin the reformatting of the blog, which will take on a distinctly different look by the end of March, focused on tracking and refining the signals of the IWM and Qs Dirty Dozen.

Friday, February 27, 2009

Qs SD Oscillator

Here's part of the larger standard deviation/ mean reversion system I'm putting together for the Qs as the final component of the Qs Dirty Dozen.
The system trades both long and short and, as with most of the systems I've examined recently over this backtest period, the short side produces considerably better results than the long side.
The oscillator effectively creates a rolling band of standard deviations and then looks for penetrations of the bands to trade against.
At first glance there looks like a lot of inputs, but the range of the inputs is actually very small so optimization takes place within a narrow range focused on finding the best fixed exit bars and defining lookback periods.
The equity curve is actually pretty impressive . . . until we get to December 08, which produces the first (modest) losing month. Until then, no losing months.
And then there's February . . . which is just plain dismal. On my near term "to do" list is a deconstruction of the Feb trades to determine what went wrong here and to reverse engineer some possible system improvements to relieve that drawdown. Other than Feb the system has definite possibilities.

TS2000i coding is shown below. I'll post open code in the comments section for cut and pasters. TS8.3 users know some order verbiage must be altered.

Thursday, February 26, 2009

Qs and %B

This is a little closer look at the %B function referred to in yesterday's post. Just to get a sense of the type of signals the %B might generate I've lined it up with the RSI2 for comparison purposes. And I've added the overlay of the 8 and 16 MAs to examine the relative performance of those cross signals.
What I'd like to do is convert that %B reading of .5 to a zero line for my purposes of analyzing mean reversion and, as this data is integrated into Tradestation code for backtesting, that will provide the basis for strategy performance. Just another task on my overflowing "to do" list.
Here's another look at the same Qs chart, but this time viewed as a Qs/VIX ratio. While the charts don't display any major differences, the buffering of the VIX does smooth out the %B line a bit. The correlation between the RSI2 and %B12 is pronounced, but it's interesting (to me) how the %B tends to keep you on the right side of the trade relative to the chop in the RSI2. This may be a product of the period settings (2 vs 12) and I intend to delve into this issue in future posts.

Finally, here's an interesting little article from Trading Markets on the benefit of mean reversion trades (in this case using options).

Wednesday, February 25, 2009

New Qs Highs (really short term)


Here's a little thumbnail for gauging how far this rally is likely to go and as such it's a short only system. The system hold time optimizes at 10 days, but given the current uber volatile character of the market and the recent failure of intraday and/or opening rallies, a close stop is highly recommended before deploying any $ on this system by itself.
Finally, but not most importantly, there's a great little study by Bill Luby using the %B function on the VIX. This coincides nicely with my weekend post on the VIX/price crosses as I try to get a better handle on the intriguing possibilities of this indicator

Tuesday, February 24, 2009

NYAD & TICK Revisited

Shown above are 10 minute bars of the NYAD and TICK over 10 days.
This is an update to a previous post on using the NYAD and TICK to trade/fade the markets.
One thing we can see right away is that rallies have not fared very well for the past 10 days. The fade the open strategy has been a solid performer for that period and the NYAD has done a superb job of keeping us on the right side of those trades.
What is interesting (to me) is the failure of the TICK to generate confirmations as well as in the previous post. Settings have not been changed. . . the TICK MAs are 12 & 24 but of the 8 solid sell signals in the NYAD, the TICK really only fired on 4, with with significant lag delay and a fifth cross on day 6 when the markets gapped down at the open to a .07 level with no relief for the rest of the day.
On 3 of the days the TICK was actually upslope. . . contradicting the NYAD signal. I'm somewhat at a loss to explain this disparity and certainty welcome any reader input, but the net effect is to shake my confidence in the TICK and rekindle my enthusiasm for the NYAD.

Monday, February 23, 2009

Qs Linear Regression Crosses

Here's another snippet of the Qs mean reversion signal I've been working on. In much the same manner as the 8/16 moving average crossover this algorithm focuses on the reliability of using the crossover of 2 linear regressions to signal impending reversals of momentum.

In coming posts I'll detail my reasons for favoring linear regression and linear regression channels over other forecasting models. For the near term I'll just mention that linear regressions channels are unique (IMHO) in their ability to capture the trend of both mean reversion and random walk price patterns.

Below is the optimization report for a close range of inputs. What's interesting here is the robustness of the crossover, almost regardless of the settings. I've optimized for max consecutive losers (1), just because risk avoidance is more important to me than maximizing equity output.
Other traders may not be as risk adverse and may choose other input options.
The (9,13,10) model also produces nice returns.

The TS2000i code is very simple and, as with previous MR studies, I'm just looking at the short side for now. I've used a Fixed Bar exit for the study in lieu of a signal reversal. This tactic gains a few more bucks on the equity curve and knocks down the risk exposure time considerably.
The fixed bar exit is (no surprise) 9 days.

Saturday, February 21, 2009

Weekly Update

The VIX/Price cross indicator proved its worth this week and one of my short term goals is to code the cross into TS and test it out on a variety of ETFs. Based on my little ETF basket, the VIX cross looks very encouraging. This rather unusual application of the VIX is not focused on the VIX's behavior above and below moving averages or in conjunction with bollinger bands, but is really a reflection of a zero line volatility cross in the same spirit as the standard deviation study of Friday. The odd hiccup on Thursday wherein the VIX and markets fell together can probably be chalked up to pre-expiration shenanigans or ? (send in your idea).
While the VIX cross will never get you in at the top or bottom, it will let you ride the sweet spot of the support/resistance cycle with very little risk exposure. It's difficult (for my old feeble mind) to imagine a daytrading application of the VIX cross, but on daily bars as a swing trading indicator there are several interesting possibilities including pairs arbitrage based on the sequential timing (firing) of the VIX crosses.
Yet to explored is a reliable exit strategy for the VIX crosses as waiting for a recross will invariably sacrifice most if not all of the accumulated trade gain. As usual, I'll look at fixed bar exits and several other momentum reversal signals profiled already in the Qs Dirty Dozen.

I'm not going to spend a lot of time on the 4LRs study this week. After this past week's carnage all the technicals in the basket are solidly oversold. IWM , the Qs and XLE look poised for a rally, currently riding the lower LR30 channel and, in the case of IWM and XLE, below the LR75.
While XLF's swoon has been dismal, if not downright pitiful, the LR4 chart suggests more downside action is likely as XLF sits on the LR30 mean.
We're overdue for a rally here, but when (and if) it comes next week, the first target levels of resistance in IWM, XLE and the Qs will be the LR30 means.
Easy does it.

Friday, February 20, 2009

Qs SD Signal Line

This is a continuing snippet of research based on last weekend's stated goal of refining a robust mean reversion signal using standard deviations of a floating price point, the pivots range mean reversion and a linear regression component.

This little algorithm was inspired by Jeff Pietsch's z-score analysis of ETF pairs trading opportunities. Now Jeff's work is considerably more complex than this system could ever hope to be, and I've stripped off the log functions to make it even simpler as they have no impact when not comparing 2 different ETFs. My goal here is rather basic and requires a conviction that price does indeed revert to the mean (eventually).
I've written before about the advantages of balancing probability theory (mean reversion) versus uncertainty (chaos theory, random walk, nonlinear logic) to build a Kit of Parts trading system of non-correlated factors and today's work focuses on some of the mean reversion aspects of that equation.

A little closer look at the TS code below reveals that we're actually looking for reversals above or below a zero line.
If the Len average price equals the current close, the result is 0, showing no + or - bias.
If the Len average price is less than the current close, the result is a + number, reflecting a price expansion above the current range.
If the Len average price is more than the current close, the result is a - number, reflecting price expansion below the current range.
If we then divide the +/- resultant by the standard deviation of the same Len range, we end up (hopefully) with a simple mean reversion to the zero line indicator.
I've just looked at the short side for now. . . the final product will incorporate both sides of the equation not only to generate BUY signals but, just as importantly, to confirm the bias of other mean reversion signal components.
As with many of the other short side systems I've profiled in the Qs Dirty Dozen, the Fixed Bar exit optimizes to 9, adding further support to this time frame as a reliable Qs short cycle.

Thursday, February 19, 2009

Qs Short Setup

I thought I'd take a little break from the flurry of recent Qs system posts, so here's a picture perfect short at yesterday's open that alert traders should have picked up on.
With the NYAD running at .07 for most of Tuesday, Wednesday's uber pop to something like R25 was a dead give away that the open was going to retrace.
The subsequent downslope in the corresponding 2 minute TICK provided further confirmation of failing enthusiasm for the opening pop.
The parabolics actually gave us 2 quick short entries and once the NYAD and TICK leveled off a few minutes after 10:00 it looked like time to cover. With the Qs performing a quick penetration of S1, and no follow through, the cover signal was confirmed.
This quick trade produced a low exposure $ .40 in just 30 minutes, or a little more than $.01/minute, which is the level of return that I target for these 20-60 minute positions.

Wednesday, February 18, 2009

Qs RSI Lag

Continuing with the new Qs Dirty Dozen, the RSI Lag system looks like a worthy component.
Trading both long and short with a good balance of performance, the system incorporates a 2 high, 2 low signal with an RSI momentum confirmation. The long side has a few more consecutive losers than I'm typically comfortable with, but the relative drawdown in pretty muted. The system only holds for a few days (which I like), minimizing risk exposure.
The equity curve is attractive given the inclusion of both long and short signals. The short side only curve is even better looking. TS2000i code is posted below:





Tuesday, February 17, 2009

Short Qicker

As long as I was off on a tangent looking at the relative performance of certain candlestick patterns like the inside day and engulfing bar, I decided to look at a pattern that Steve Bigalow calls the most powerful pattern. . .the "kicker". This is basically a reversal bar that forecasts a change in market direction. Now Steve's definition of the short side "kicker" pattern requires the trigger bar to open at or below the previous day's low, which (no surprise) limits the number of incidents significantly.
In typical fashion I've revised the setup to loosen up entry conditions , I've added a little momentum filter and I've turned on pyramiding to take advantage of those times when the markets decide to do a little head-fake or retrace before going in the original direction forecast by the kicker . . . the result is the "Qicker".
I've written the TS2000i code as a series of conditions and,as usual, I've used a simple fixed bar exit. It's interesting that the fixed bar exits on the short side for the Qs system typically optimize in the 7-9 day range, so that encourages me to be alert for other Qs setups that mirror this timing cycle.

Monday, February 16, 2009

Weekly Update + Pivots MR

Above, the daily line charts of my 4 ETF basket overlaid by the VIX and the new moving LR7, which I described a couple weeks ago. I'm particularly interested in those instances where the VIX crosses the ETF price as in most cases this has resulted in a tradable 1 to 2 week price surge in the underlying ETF. This is clearly a longer term tell and. reiterating a tactical approach mentioned last week, the best (safest) strategy is to bide your time, employing the patience of Job, and waiting the signals to set up.

As part of my on-going systems refinement, my plan is to merge this VIX divergence signal with the pivots mean regression (MR) signal discussed below to produce a more robust forecaster of trend and momentum.
The lower chart here is the 4 ETF basket again with my usual 4LRs study. All the LR30s are downslope except the XLE, which continues to display a nice lateral pattern supporting my butterfly 47 position that has worked well for the past 2 months.

Some divergence in the RSI and the 4 LRs on all the ETFs, except the XLFs, which continue to look dismal.
My attitude for the coming week is one of caution . . . HEY!, that's the same one I've had for the past 18 months. With expiration this week and the full impact of the bailout plan yet to be factored into the market, I'm keeping my powder dry and sticking to my stable of daytrades to scalp off a few bucks until the trend signals get a bit more confirmation.

Below is the update of the Qs weekly pivot study that I began last weekend. After last week's decidedly negative results, which followed the Qs mean reversion (MR) chart's signal (bottom chart), I am clearly encouraged to pursue the forecasting possibilities of this signal a lot further. Now this chart just reflects the Qs behavior, so a bit of caution is warranted. Nevertheless, in the market's constant flux of mean reversion and random walk, the arguments favoring a mean reversion bias are increasingly supported by the results of the 2 Dirty Dozen system portfolios I've posted.
The results I've posted so far are based on weekly bars and I've yet to apply the algorithm to daily bars or even shorter time frames. It all takes time . . . a lot of time.
My intent for the short term is to refine a standard deviation signal line that was inspired by some of the truly stellar work by Jeff Pietsch at Market Rewind and combine that with the Qs MR signal line and the VIX/ETF crosses mnetioned above to yield a unique forecasting signal.
This endeavor is still in it's infancy and may ultimately become another Kit Of Parts project with a variety of adaptive plug and play Conditions that reflect short term trend and volatility. For the near term my focus will remain on the Qs as I complete the Qs Dirty Dozen components and update the Qs KOP, which continues to yield impressive (IMHO) returns with minimal drawdown exposure.

Friday, February 13, 2009

Qs Engulfing System

This is the inverse of my previous inside days study and reflect the Qs behavior subsequent to engulfing bars. TradeStation already has a resident algorithm for engulfing bars (plus other candle patterns), so the coding doesn't require much effort. Nevertheless, I've combined the bull and bear patterns and added my no-brainer fixed bar exits just to see if any pattern emerges.
While nobody's gonna get rich playing the long side here, the short side is an eye opener, with 100% success (this version has pyramiding turned on.) When used as a complement to the inside days system, it helps confirm short term momentum.
Exposure time is a comfortable 5 days (for me).
Not a lot of trades over the past 16 months but, as with most of the Dirty Dozen systems, the trick is to just sit tight until the systems fire before putting any dollars at risk. Now that's just my own tactical approach to risk management and each trader should review their own unique comfort level (and trading plan) before initiating any new positions.

TS2000i code is shown below:

Thursday, February 12, 2009

Qs Happy Trails

Last July I introduced Happy Trails for the IWM.
This is an updated version for the Qs as I continue to build the Qs Dirty Dozen.
The top report has pyramiding turned on and requires a maximum 24x position.
The results speak for themselves.
I'm including this system in the Dozen for a number of reason. First, it doesn't use the RSI(2), and as such enhances the reliability of signals based on non-correlated factors (systems). Second, if you study this thing on your own TS chart you'll see how the sequence of the pyramiding trades help define the strength of momentum in either direction (homework for the True Believers). That whole momentum building concept is a study in itself that may see further investigation in my (very limited) spare time.
The report below is the basic system. . . so there's not a lot of activity based on 70 day cycles within a 16 month test period. That's why pyramiding was turned on for the top report.


Those who followed the first version of Happy Trails will notice that I've added a new input to reflect the variable momentum in the long and short cycle. While optimizing with the added input yields only marginal gains, at the same time the similar of the inputs reflects the reliability of the system. For the Qs test I turned off the stops previously engaged. TS users can fiddle with their favorite stops to tweak performance and manage risk to their own comfort level.
The inputs for Happy Trails with pyramiding turned on are a bit different, to reflect the increased activity. . .(60,70,13) so adjust accordingly when performing your own testing.