Friday, March 30, 2007

Have a trading system?

This is a chart comparing the Dow Jones Industrial Average to the 30 year interest rate of the U.S.Treasury Bond. Today everyone is watching the Federal Reserve to see what hints they can attain from the wording in every speech and meetings they have. The addiction to declining interest rates has lead to an entire industry of analysts that have kinds macro models and crystal balls to help tell the future on where rates are headed. The reason that this industry of interest rate pundits can take up so much press time in news papers and television is the simple fact that very little in our country is purchased outright, it is borrowed. We will gladly pay you next Tuesday for a hamburger today. Way to go Wimpy.

How low do rates need to be for businesses to function efficiently and consumers to be able to live within their means? If consumers want to live beyond their means, then it makes sense that rates can never be low enough. The auto industry got to the point they offered consumers 0% rates and cash back to purchase cars and trucks. Consumers and businesses do not feel the effects of the dangers of existing in a leveraged/borrowed-to-the-gills environment, until one of the many balls they are juggling starts to fall. When this happens, we get to listen to the pundits and economists talk about the soft landing. There is never a soft landing, just a delayed crash landing. If the small amounts that rates have gone up since 2005 and into 2006 have caused the issues we are dealing with in the real estate market, the problem isn't interest rates; it's unrealistic purchases-- and the government does enough of that for all of us. Ready for the soft landing?


With the use of computers, it has become easier and easier to scan market data for specific data and patterns of data. This data can be from the fundamental facts of a company, or technical price data from the trading of the company's stock. This abundance of data has made it possible to compile lists of stocks with great fundamental qualities and then test certain perimeters to see what happens when the stocks perform best.

One way to approach trading is to try to make it automated. This is where the trader/investor picks certain indicators and price patterns, and lets the computer scan through all the data and create a list of stocks. These stocks can be traded on a discretionary basis or through the use of an automated buy and sell orders.

There are various software systems on the market that can test a trader's/investor's theory on what indicators and conditions work best. Technical analysis can often turn into witch magic, where facts and information is read into the data which is not actually there. There is a risk of having the bias become too strong, and then the pitfalls of a system are ignored or minimized. It is very important to be positive about a trading idea, but know it inside and out. Know the weaknesses as well as, if not better than, the strengths. Below is a simple example to show how these ideas are tested.

In this example we will use the S&P 100 Index component stocks. This is used for simplicity, not to make a comment on this group.

The system will buy when:

1.a stock makes a new 4day high.
2.the volume on this day is greater than the day before.
3.the close of this day has to be in the top of the range for the day.
4.the stock has to be greater than the 34day exponential moving average.

The system will sell when:
1. the stock makes a 20% gain. OR
2. the 3day exponential moving average crosses below the 8day exp. moving avg.

This is a very simple concept,used to show the idea.Do not use this system. The dates used start 4/5/2005 and end 3/29/2007. Here are the results:

As you can see, this system has some good winners and some dogs. Another point to consider is the median winner in the system. If over a two year span of data, there are a lot of 1 and 2 point winners; that might not be what you are looking for. A trader might like more trades, while an investor would want less trades and more trends. The system built depends a lot on the personality of the trader or investor.

Have any ideas or concepts you want tested? Leave a comment or click the question button above and send an email. If they are not overly complicated, I will test them and email you back the results.


These are the results if the system was applied using a $100k account and you divided the account into 10 positions; $10k per position. The commissions are $5 for each side of the trade. No margin was used. The problem with this data, is it does not take into account which 10 positions that could be held at a given time. It is just running the theory and how it effects each stock in the OEX. To see the results on an aggregate basis, this data would need to be exported to Excel and ranked by date to determine which 10 positions would be held at any given time. This has not been done with this data.

Personal experience has shown, that developing a system is not an easy task. It is not as easy as applying a couple indicators and ending up with the holy grail. Having an entry that is generated by a pattern(triangle,4day new high,ect), and then an exit generated by an indicator seems to work. This works in the reverse, but the results for using a simple moving average cross over seems like it would work, but it doesn't have the results one would think. Another point that seemed to work, is to take the day perimeters of a system, and then apply them to intra day data. An example would be like taking a 5day moving average, and then converting it to apply to 45min bars. The new moving average would be 45 period moving average when applied to the 9 45min bars that make up a trading day. This allows the system to enter and exit intra day, often resulting in better results.

This is the results for AA. It performed better than the buy and hold figure. This was one of the exceptions in this test. A good system should outperform the buy and hold index. A good system should have some other characteristics, which will be covered later.

The next post will deal with the writing of a scan for a specific chart pattern, which can be used to set up an entry. This can be combined with any number of indicators.

Thursday, March 29, 2007

Is the Sky Falling? Again?

"People know that inflation erodes the real value of the government's debt and, therefore, that it is in the interest of the government to create some inflation."

Ben Bernanke (Nov.2002)

In listening to the news outlets, one would think inflation is the worse thing that could happen to an economy. When inflation grows, it can be a result of consumption and be a product of a strong economy. The United States is the biggest economy in the world. The consumption by the United States is greater per capita that any group in the history of the world. That being said, it is not the only economy and it is not the fastest growing economy in the world now. China's economy growing at what some say is close to 10% per year, is going to have a greater effect on the price of natural resources than anything a retiring baby boomer generation is going to do.

In the previous post there are two charts of the metal nickel and lead. Nickel is used to make stainless steel. Stainless steel is found in so many higher end products that are now in demand in China, and also in India. Lead is a metal used in batteries, among other things. As China's economy grows, bicycles will be replaced by motorbikes and cars. All these motors require batteries. These batteries need lead, and the process to start a lead mine is not an easy environmental issue to over come. These two metals are just examples of the many things whose price is effected by growing economies and inflation. This demand/inflation is not controlled by the Federal Reserve.

Inflation is like alcohol, a little is a good thing. Have too much and you will want to pray to God and swear off it forever. We as a country are addicted to low interest rates because we finance and leverage ourselves in almost any situation possible. People don't save up and buy a car, the buy the car and pay as they go. It is part of our culture now. In some new commercials, people can even finance and draw a loan against their future paycheck. How crazy can it get?

Controlled inflation is something that the Federal Reserve Board wants, and with our national debt, we need it. Do you want a strong dollar or a weak dollar? We may not have a choice.

A sell off of can be a blessing in disguise. It shows which stocks are strong and can hold their own on weak days; imagine what the future holds if the market finds its feet and rally.

1.Shows the divergence in the advance/decline moving average with the highs made earlier this year. The rally was being carried by a smaller and smaller group of stocks.

2.This shows that the second lower low that was made 2 weeks ago, was extremely oversold. The adv/decl moving average showed that as the new low was made in prices, the selling was not as strong. Time to cover shorts, the world wasn't coming to an end yet.

3.In this situation, the adv/decl moving average showed buying that was a result of short covering and buying that came in when the old low became support for new buying. This buying got carried away, and the price did not match the amount of buying. Consolidation is needed before we can build off the recent lows.

Juniper Networks has been a quiet leader in the Nasdaq rally since last fall. It has now shown some strength again by breaking out of a channel when the over all market has been weak. It looks like good days ahead.

Boeing showing some strength.

Both Colgate-Palmolive and General Mills are showing they don't have the same selling compared to the over all market. A good place to invest if the economy is weakening. Some things people will by no matter how bad things get.

Zoltek Companies Inc is strong, good volume and finishing near the high when the market took it on the chin.

Burlington Northern Santa Fe and CSX both have declined the last couple days with declining volume. This could be a set up for a short squeeze. These stocks can become very thin when you want to cover a short.

Two other stocks on the radar are Goldman Sachs and Lehman Brothers. On a percentage basis GS has held stronger on this sell off than LEH. Brokerage stocks tend to lead the market both up and down. This is a group to watch as oil breaks 70 and talk of mortgage trouble takes over the news. They often profit when commodities move, and are hedged way better than people give them credit for on interest rates.

Tuesday, March 27, 2007

Greenspan and Data

"Most economists were initially skeptical about increases in productivity. But as time went on, Alan said that the data he was pouring over didn't reconcile unless productivity was substantially higher than was generally thought. One of Alan's great strengths is his wide-ranging focus on data and his insight in drawing inferences from it. He'd show up at breakfast and ask what I thought about the latest railcar shipments of some type of wheat I had never heard of before. "Alan," I'd say, "I don't know how I missed that figure in the paper, but I did." He would have worked out a whole hypothesis around it. Greenspan was the three of us to reach the tentative conclusion that productivity growth did explain the absence of expected inflation. That meant that the speed limit on economic growth was higher than we'd thought. Larry and I followed in agreement somewhat later."

Robert E. Rubin, In An Uncertain World (2003)

This quote from Robert Rubin's book, In An Uncertain World, shows the depth of the data the Fed watches when making decisions about the economy and inflation. This view on productivity was said with the constant being that this growth was accompanied by strong sound fiscal policy. Whoops! We do still have relatively low interest rates compared to historical standards. Is that always going to be the case? Enough about economics.

This chart shows the divergence between the NYSE Composite Index and the Dow Jones Transportation Index. As the NYSE made new highs starting last fall, but transport index didn't confirm the rally. This could be because the transports are so closely correlated to the car industry and the homebuilding sector. Both of these groups were strong for so long. It started back with 0% interest rates on cars, then 0% plus cash back. The real estate market was benefited by low interest rates and the fact that it was an attractive area for investment compared to the stock market, which took such a beating starting in 2000.

The bright spot in the transportation area, are the railroads that deal in the transport of raw materials. Commodity prices are still holding strong, and could only get stronger with the dollar getting weaker. Even if demand slows here in the United States, global demand is going to remain strong for basic materials. China and India want stainless steal refrigerators and appliances like we have. They want cars and houses and all the things we have. So demand should stay strong globally. This could lead to inflation and put the Federal Reserve in a tough position with slowing growth here and raising rates to curb inflation. The market seems to be addicted to the idea of rate cuts. If the Fed cuts rates, it will be for a reason that won't feel good at the time its done. They might not want to say it, but the risk of inflation is still great. The risk is brought on by global growth.

This is a chart that shows the railroad index in comparison to the Dow Jones Transportation Index. In the lower part of the chart is the Basic Materials SPDR. In this we can see that material stocks are performing great, along with some of the railroads that carry their products. The transportation sector as a whole is not as strong, because trucking and air freight costs are so effected by the very same basic materials.

It is important to watch the transportation stocks and in particular the railroad stocks. They are the carriers of the raw materials and commodities that are in the leadership group of our current market. These stocks are high fliers, and can have 10-30% pull backs and still not break their longer term trend lines. Look for pullbacks and when everyone on TV says the bull run in these stocks is over...that is the time to buy them.

Friday, March 23, 2007

Watch out for the waves Sandpipers!!

This is a basic chart of the NYSE Composite with volume and the advance/decline line moving average in the bottom section.

1. Shows that volume on the rally the past few days is not matching the volume on the decline we had a week and two weeks back.

2. Shows the rising prices in the market along with the declining slope in the advance decline moving average. This was a key that this move into new high territory was being carried by less and less stocks. That doesn't mean that the rally is not real, just that it could be healthier and more stocks should have participated.

3. Shows that the low last week was an oversold area, confirmed by the divergence in the advance/decline moving average. This divergence was an indication that the sell pressure from the week before was not as great as two weeks ago. This is a good point to enter the market with a stop close by. How far can this rally go?

? Is an area that looks hard to enter into new positions. The advance/decline moving average is now above its recent high, yet prices have not recovered in the same way. How much steam is left, where are the new buyers going to come from. It's hard to know the answers, but caution is warranted.

This is the corresponding chart of the Nasdaq Composite.

The two charts here are both of the Nasdaq 100 Index and the S&P 500 Index. The bottom most section of the chart is a spread between the two(NDX/SPX). In a healthy bull market technology is seen as a leader. This is in the 1 area on the first chart. This was the bull market that ended in 2000. The spread showed a strong upward slope and stayed above its moving average. After 2000, when the glass became half empty, technology lead on the downside also. Its gains are greater in bull markets and losses harder to handle in bear markets. It is where growth and innovation are, it is where the new companies of tomorrow are supposed to be. In the second chart it is evident that the S&P 500 is as strong, if not stronger, that the NDX. The NDX has times that it leads, and those are great rallies to trade in, but lately it isn't showing strength on a relative scale. It doesn't mean that there are not winning stocks, it just means you have to be a lot more selective and accepting of profits when they come. There is no need to be greedy, when the wind is in your face; just take what the market gives you.

Wednesday, March 21, 2007

Short Attentionspan Theatre.......

It seems investors have been waiting for the Federal Reserve Board to change their wording in regards to interest rates for so long now. The hope was that they would take away their bias towards raising rates. Well be careful what you wish for. All the people who fool themselves into the idea that lower rates are good for the market are probably pinning their hopes on it can save the housing sector and reverse the recent trend in the real estate market. Human nature runs in cycles, and can not be derailed like a runaway train. It can be made to seem like somethings its not, but the inevitable cycle will run in course. How many successful attempts have their been by foreign central banks to manipulate their currencies? None come to mind, and many failures of large scale are evident.

So today the Fed dropped its tightening bias, and everyone had a party buying stocks. It is important to look at why they removed their bias, and what do they see on the horizon that maybe are not evident now. Their fear of inflation is not balanced by some other concerns. What happens when rates stop going up? Well for one the dollar becomes weaker and this can cause many things which the party goers today who bought stocks might not be focused on.

This is a weekly chart of the US Dollar Index. Its value in the beginning of 2002 was around 120. By the beginning of 2005 it was in the 80 range. That is a significant drop of over 30%. We do not feel this effect here domestically day to day as much as foreign investors and holders of our debt feel it. If you were a foreign owner of our stock market in 2002, and held it to 2005, you lost 30% just in the currency conversion regardless of what stocks you owned. It could not have been a profitable time.

This next chart shows the interest rate on the 10yr treasury versus the S&P 500. As rates were going down in, because of the underlying weakness in the economy, stocks followed. Once rates seemed to stabilize, then the focus went back to seeking value in equities. This was fueled by the fact they with rates so low, it was possible to borrow money in other parts of the world and invest it here in the states, for a seemingly risk free trade.

So now that the Fed has said rates are on hold, it can be good news if we are in a sweet spot. If they do however start cutting rates this fall, it will be because of some weakness in the economy. Most likely this will be the unemployment rate and its effects on the psychology of consumers. Will this mean inflation won't be a factor? No it won't mean that at all. We are large consumers without a doubt, but we are not the only reason for inflation. Twenty years ago we could get wrapped up in ourselves, and think we were the world. Today our consumption could decrease and inflation could still continue to grow because China and India are growing large scale economies.

When the US Dollar continues its down trend, the stronger currencies should be those from economies based with strong commodity resources. Two that come to mind are Canada and Australia, both are large mining countries and Canada has a significant energy industry. With today's rally we can see the strength in some of the metals and mining stocks. As the US Dollar weakens, it will make commodities traded in dollars more expensive to compensate for the dollar losing value. Below are some stocks that are in the metal and mining industry, that had some triangle formations. Look for volume to accompany any breakouts. Be selective and go with the best looking patterns.

Tuesday, March 20, 2007

1 1 2 3 5 8 13 21 34 55 89 144 And Triangles

phi = (sqrt5 – 1)/2

What do these numbers mean and how do they relate to trading or investing? Well it is probably easier to make an argument that they don't have any business in trading, and people who try to apply them are projecting them on the market. That would be an easy argument and it would do a major disservice to the theory and what this ratio represents. Names like Euclid, Luca Pacioli, Fibonacci and,Pythagoras probably scare some people and cause painful flashbacks of high school math for others, but they are worth looking at to see how we can apply "all that crap I learned in high school" to gain something productive today.

The ratio of segments in this 5-pointed star (pentagram)are considered sacred to Plato & Pythagoras in their mystery schools. Note that each larger (or smaller) section is related by the phi ratio, so that a power series of the golden ratio raised to successively higher (or lower) powers is automatically generated: phi, phi^2, phi^3, phi^4, phi^5, etc.

To apply this to the market, we can often become to creative(art) or too scientific in our approach. In most charting software there exists a function that will let us draw the Fibonacci extensions and retracement numbers with just the click of a button.

What we do with this tool in the chart above is to start with the lower high in 2000 and then measure to the low in 2002. The high we are using is 1530.09 and the low is 775.68. The lines that are drawn act as a type of map for the market. We should recognize when the market gets back to these levels and see how it acts. The levels act as targets, and once reached and shown to hold, then become support for the next wave up. How are these levels calculated? We take the High and subtract the low to give a value for the move down, 1530.09-775.68=754.41. 754.41 is our key number now in these calculations. We want to multiply 754.41 by 0.50 to get the 50% retracement of the move. the other two numbers at minimum that should be used are 0.382 and 0.618. The are derived from our Fibonacci numbers. If we divide any Fibonacci number by the next number in the sequence we will get approximately 0.618(21/34=0.61764). The flip side of this is of we take inverse of this, 1-0.618=0.382. These are just 2 of the basic numbers that can be used. In the above chart of the S&P 500, it is apparent that these levels show to be valid when reached. This could be for many magical reasons, or just a self fulfilling prophecy because so many people use them. Regardless of the way, it is good to have a knowledge of where these levels exist in the major indexes.

Triangle patterns are one of the most reliable chart patterns to look for. The are formed by a series of lower highs coupled by a series of higher lows. Below is an example, Williams Companies, WMB.

This shows one of the smaller breakouts this stock has had. Its breakout was accompanied by strong volume, and once the rally stalled, it formed a tight triangle on the weekly chart. The Fibonacci numbers and ratios not only gave an indication where the bottom of this triangle might form if it was a healthy breakout, but it also gave a price target for the next break out! If we went back to our example of 21 and 34, and instead divided 34/21, we would get 1.619. This is very close to the 161.8% extension number given by are chart tool. Another way to check the system is to look at the width of the triangle around the middle area. In WMB it is around 1.30,(16.50-15.20). If we then take 1.30 and multiply by the 1.618, we would get 2.10. If we then add 16.50 and 2.10, we get a secondary target that gives us a safe price target for our break out of the triangle of 18.60. This is not a huge trade, but not bad on a percentage basis, and the risk was definable. It is also a product of the size of the triangle formed. The bigger the triangle, the more potential the trade has.

Next post will continue with triangles and touch on how to find them using a computer program.

The Second Mouse Gets The Cheese

The Monday after the quadruple witching is often one of light volume. So much activity has gone on the past few weeks, that it is a time to take a breather and start anew in looking forward for another quarter. Since the third Friday of March is past, all options are now being traded for the month of April and the futures on indexes are now trading the June contract. Everyone has rolled over. This can lead to a lot of over analysis, but one thing it means is the roll over trade and hedging associated with that are done for a while.

Yesterday's volume was light, but that can be expected the Monday before a Federal Reserve announcement on interest rates. Today before the market opens we will have some economic reports from the housing sector. Combine these two events, and the light volume on Monday, and the 115point up day in to Dow Jones isn't something to hang your hat on. With the down moves we have had in the past two weeks, the focus on risk is something that more and more traders/managers are thinking about. Over the past couple decades the market usually has a 10% correction about once ever 18months on average. It has been too long since we have had one, we are due. Having a correction does not mean the end of the world. It can be painful if you ignore the signs and pretend that everything always goes up and there isn't anything to fear. One thing to watch for is the volume on up days versus down days. If we have down days that are on heavy volume and the rally days are on light volume, don't get carried away trying to be bullish. It is best to wait for some really heavy volume on an up day of close to 2%. The with some follow through after that day, you can have something to buy positions off of and use as a stop or support area. Right now the risk reward is not in favor of being bullish. You do not have to be the first mouse to buy!! Don't pick bottoms, didn't your mom tell you that?

With all of the foreign investment in the United States, and the fact that many commodities trade in US Dollars, it is helpful from time to time to look at what the dollar is doing against other currencies. Below is a chart of the US Dollar Index. It compares the Dollar against a basket of foreign currencies. If you are a foreign holder of our debt(bonds) or stocks, you probably watch this data more so than someone in the states. It is something we should all watch. If stocks are not performing well and the dollar is going down, well foreign investors are then losing on two trades; the stocks they own and the dollars they own it with. As an example let us say XYZ is $100, and the stock market goes down 5% and the currency goes down 5%. It is a double loss, and is felt more by foreign holders of our stocks than by domestic investors. One other thing to watch is as the dollar goes down in value, it should cause all those commodities, oil especially, to go up in value. This is just based on the currency fluctuation, regardless of supply and demand. All these little things can add up. The day when China's stock market was down 9%, our market followed and was down. Our bond market however, which China is a major holders of our bonds, rallied as there was a flight to safety. So everyone is looking at the China market being down so much, but China's holdings in our bonds had a great day. I look to seeing this situation happen a few more times. It hurts our stocks some, but bonds going up keeps our interest rates down. With our rates down, the world hopes we will consume and consume, and they can sell us all the boat loads of rubber dog poo and other happy meal toys they produce.

With uncertainty in the market, it seems to make sense to focus on commodity based stocks. This is a large group, and the next few posts will deal with Oil and Metals.