Showing posts with label Cross Over. Show all posts
Showing posts with label Cross Over. Show all posts

Sunday, May 20, 2007

Testing - Composite Cross Over II

In the previous post I combined linear regression slope with the cross over filter to see what would happen. Recently stockfetcher added fundamental analysis features to their filtering capabilities and I tried combining Beta with the cross over filter v6.

Beta is the amount the stocks price varies from a baseline index. If the price has more momentum than the baseline then beta is greater than 1, if it has less then the beta is less than 1.

I had always thought that high beta were better stocks to buy. And they are but only when the stock is ascending. In general though low beta stocks have the best returns. The test was simple - back test stocks where beta > 1 and where beta < 1. Here are the results.


One day I intend to run this test over a number of different periods, but for the current period these results are just fine.

I then added a line to the cross over v6 filter that said "and Beta < 1" and tested that. Then I change the line to greater than 1 and test that. Here are those results


Once again the original filter is the better filter but cross over candidates where the beta is < 1 seem to have a better ROI and 30 day net than those where the beta is greater than 1.

So that is one more way that you can look at composite results - using the results to inform between selections if you have a lot of selections on any given day.

Now I haven't tried a linear regression slope plus beta filter - maybe I will someday.

Testing - Composite Cross Over

Many times I like to add some complexity to my simpler filters to see what would happen if...

Today I was looking at the cross over filter v6. That looks like this -
show stocks where close is between 15 and 35
and average volume(90) > 500000
and open < ema(21)
and open < ema(8)
and open < ema(4)
and close > ema(21)
and close > ema(4)
and close > ema(8)
and close > open
and close 3 days ago < ema(21)
and close 5 days ago < close 3 days ago
and close 5 days ago < ema(90)

And I added a line to the filter which contained a constraint for the linear regression slope - that looked like this

and linear regression slope(45) < 0

After testing the 45 day version I tried the linear regression slope less than 0 for a 15 day period and a 30 day period. And then I changed the less than 0 to greater than 0 -
and linear regression slope(45) > 0

And tested every version in that configuration and here are the results


What this shows is that the original cross over v6 has a good win percentage, a good short term (4 day) ROI and a good 30 day net change. It also has a good number of selections. None of the other filters quite matched or exceeded these results in total. But there are some things to learn from this.

If you want a filter that doesn't pick many stocks but those that it picks have a high probability of winning with a great reward to risk factor and a super ROI then you would use the linear regression slope for 30 days greater than 0.

On the other hand while the filters where the linear regression slope was less than 0 did not match the original, they weren't too awfully bad either. That suggests that maybe combining the LRS with the cross over isn't such a good idea but maybe the LRS less than 0 has some promise either on its own or combined with another good filter.

Something to think about - something to look into.

Friday, May 11, 2007

QT Code for BOB and Cross Over

A new reader asked for some code so here it is - once more I make no representations of this information - you use it at your own risk. I provide no guarantees - this is NOT an invitation to speculate in the stock market.

BOB

If bar low[1] < bar low[2] AND volume[1] > volume[2] AND bar open[1] >= bar close[1] AND bar open[2] >= bar close[2] AND bar low >= bar low[1] AND bar close > bar open AND ema(8) < ema(21) set color to “choice”


Cross Over 1 (for signal on the cross over bar)

If bar open < ema(21) AND bar open < ema(8) AND bar open < ema(4) AND bar close > ema(4) AND bar close > ema(8) AND bar close > ema(21) AND bar close > bar open AND bar close[4] < ema(21) set color to “choice”

Cross Over 2 (for signal on the bar after the cross over bar)

If bar open[1] < ema(21) AND bar open[1] < ema(8) AND bar open[1] < ema(4) AND bar close[1] > ema(4) AND bar close[1] > ema(8) AND bar close[1] > ema(21) AND bar close[1] > bar open[1] AND bar close[4] < ema(21) set color to “choice”

I use two cross over indicators - one on the bar and one after the bar. You don't have to do that.

You do have to select your own colors however. That's easy enough.

And, yes, there are differences between this version of cross over and the one I use on the daily charts. Most notably the moving average requirements are missing - I don't always play stocks that are below the EMA(90) and neither should you. I just prefer to filter for them because they have a lot of room to run.

Wednesday, May 09, 2007

More Cross Over Charts

GE printed three cross overs in the past three months - one was profitable, one wasn't and one was a break even.


Cross over 1 (X-over 1) was almost an instant failure. I don't like buying into a gap down that continues down as happened on 2/15. I would have passed this cross over as should you.

Cross over 2 (X-over 2) became profitable but then collapsed. That hanging man on 3/26 indicates an exit. This trade would have been break even at best.

The third cross over returned about 4.7% in 6 days (4/26 - 5/2). This is the kind of cross over that we are looking for constantly.

Finding cross overs is simple - you don't need any fancy software nor do you need any money involved. Just time. I hope that the readers of this BLog are familiar with stockcharts.com . If you are, good - if not - you should remedy that fault immediately.

Select a candle glance group and click on any of the charts in the group. Then click on the top most chart that appears from that entry. This leads you to sharp charts 2. The Stockcharts sharp charts 2 capability permits you to change everything from number of days, weeks, or months to types of moving averages to types of indicators. and then simply run a set of stocks through that chart looking for cross overs. It is tedious but the exercise does your mind a world of good and you might pick up on a lot of other potential entry conditions as well. And if you hit a great cross over such as ATVI you will be well paid for your efforts.


Again there are three cross overs shown on this chart. Number 1 is a gap up and while gap ups sometimes go on to higher and higher places most often they are an overreaction to some news event and sobriety soon hits the market place and they fail. This was that kind of gap up.

Number 2 was a bit better and actually gave you a piece of change before it failed at the end of February. But that failure was not a result of the stock but a result of the market (Feb 27th) so this would have been a good one to watch.

And sure enough number 3 came along and took ATVI to the sky. The tweezer top defines the sky in this instance and suggests a perfect time to take profits and exit the trade.

Really sharp readers will note that Philip's Set up is associated with each of these cross overs. And I just noticed that myself so it might be a good thing to look for as well. It won't occur with every cross over but when it does it might signify something special in the stock.

Our final exhibit is in the class of failed cross overs. Here is MOT


First - it's MOT. MOT is in the news all the time and the words - "failing company", "bad stock", "poor investment" are usually found in the article. But the reason why you shouldn't take this one is the same as discussed above on GE - there is a gap down open. And that cross following the cross over probably suggests caution. But even if you did take it and then had it gap down again on you the next day you could be assured that it would come back a bit because it is MOT and regardless of my feelings about the stock it is beloved by the funds. So your max loss might have been around 30 cents a share and that's not too bad.

The cross over method will yeild a lot of winners but you have to watch the entry and make sure that the stock wants to go up and isn't just fooling around.

Find the code for stockfetcher here.

And again - if anyone finds a consistent method to better this approach please share it with all of us. Thank you.

Tuesday, May 08, 2007

Some Cross Overs

Here is a double cross -


I have no idea of the significance of this but I don't think it is good. HANS is an extremely volatile stock but this is ridiculous. I'm going to want to watch this for a bit to see which way it goes.

Here is HANS on a 3-day 30-minute version.


I'm showing you this because there is a cross over on the second day of this chart in the 2:30 bar. This crossover follows through into the next hour - but you know my rule - if you buy on the minute charts you should sell on the minute charts and not hold overnight. That would have been a very nice profit even so. You would have purchased at 38.40 and sold around 40.40 and 2 bucks in an hours nets out to a whole bunch annualized. I'm a purist with this indicator - the third bar of the second day is not a cross over because it didn't close above the averages. And if you made a mistake and took it as a cross over with your stop below the open of the that bar you would have been stopped out a bit later in the day.

Another chart I wanted to show you is RIMM.

There's no deep lesson here - just wanted to show you how the cross over works for expensive stocks too.

Still another is AAPL -


The cross over was back on 4/23 - a purchase on 4/24 would have reaped a nice profit over the next 10 days.

And here is MSFT -


The crossover came on 4/12. Note how the stock never dipped below that open and also note that the averages were in correct order (4 over 8 over 21) at this cross over. This too would have been a nice profit - at least as nice as they get with MSFT.

And finally the last of the three amigos, the final stooge - GOOG -


I'm showing GOOG to demonstrate the anti-cross - the reverse cross over. That occurred on 4/30. It was negated on 5/03 by a normal cross and that was negated by yet another anti-cross on 05/07. Stay tuned - which way do you think GOOG is going to go?

Friday, May 04, 2007

Cross Over Re-Test

I ran several re-tests on the cross over filter (Cross Over v6) and here are the results -


This is a 4-month stepped re-test beginning last October and completing yesterday. You can see that the win percentage remains relatively stable regardless of market conditions and the ROI remains fairly high as does the reward/risk factor. This is also a good long term (30 days) filter.

The charts from the stocks output by this filter look like this


The cross over occurred on 5/01 (I currently own shares in this stock).

Here is the code - it is easily replicated in many different systems.
show stocks where close is between 15 and 35
and average volume(90) > 500000
and open < ema(21)
and open < ema(8)
and open < ema(4)
and close > ema(21)
and close > ema(4)
and close > ema(8)
and close > open
and close 3 days ago < ema(21)
and close 5 days ago < close 3 days ago
and close 5 days ago < ema(90)

Thursday, April 26, 2007

Cross Over - The Filter

I have been working on the Cross Over filter for several years and I think I might have finally found one that is everything I look for in a filter - good short term and excellent swing trade potential rolled up into one common package. Here is the filter -
show stocks where close is between 15 and 35
and average volume(90) > 500000
and open < ema(21)
and open < ema(8)
and open < ema(4)
and close > ema(21)
and close > ema(4)
and close > ema(8)
and close > open
and close 3 days ago < ema(21)
and close 5 days ago < close 3 days ago
and close 5 days ago < ema(90)

For a long time I was trying to manipulate the EMAs so that the bundle of averages formed the correct (in my mind) sequence. Then it occurred to me that all I really care about is for the open to be below the three traces and the close to be above them and I really didn't care what sequence they fell into.

The next important step was the fact that I wanted the previous closes to be below the crossing bar and adding the additional requirement that the close of 5 days ago be below the close of 3 days ago adds tremendous value to the entire process.

And believe me when I say that it tests significantly better when the close 5 days ago is below the EMA(90) than when it is above.

When I ran my first tests I was pretty pleased with the results. Long time readers know that the current test period (11/06-3/06) is a very difficult period and it takes a serious filter to break through the malaise of end of year into early year trading. Well this one kicked it - and soundly. After seeing that I tested both sides of the current period and came away with some very good numbers. Here are those results


The Net Change numbers are also impressive


So once again - a simple filter with significant results.

This is not an invitation to speculate on the stock market. If you don't have the stomach for risk I would suggest you buy a market-tracking ETF such as the SPY and amaze all your friends with your constant Beta of 1 and non-existent Alpha.