"An expert is a man who has made all the mistakes which can be made, in a narrow field."

- Niels Henrik David Bohr

Friday, January 1, 2010

My approach to buying stocks

Now for some practical - and principled - application of my personal market philosophy. And a few personal anecdotes along the way.

My approach to trading has run the gamut of extremely short time frames, longer time frames, whimsical notions and gut feelings, virtual trading, technical indicators, and fully automated trading. What follows is not by any means ground-breaking, but it is the result of expensive mistakes - lessons learned the hard way, and all what I would consider important things to consider in developing one's own buy strategy. What I wouldn't have given to read something like this prior to starting to trade again last spring...

Let's get started.

And by the way - I like to keep things simple.

Principal 1


Change in price is the best indicator of what people are thinking about a company, and where the price is headed.

First, when I started trading several years ago, I decided that there are people participating in the market that are much more sophisticated and better at compiling and interpreting company performance data than I am. I realized that I didn't have the time - and, honestly, I didn't want to spend the time, researching and interpreting company financials. In fact, for awhile this led me to believe that the best way to take advantage of this was thru mutual funds. Paying smart people for their opinions and expertise.

Secondly, when I started trading again over this past spring and summer (2009), I learned the hard way (and awfully slowly) that the market is always right: if most people want to buy a stock the price goes up and if most people want to sell a stock, the price goes down. Doesn't matter what I, all by my lonesome, think about the price or the price potential of a stock. It doesn't matter what any other single person says or thinks about the price of a stock, even if they are well paid professionals - it only matters what a lot of people collectively think about the price of a stock. Funny thing is, this also means that if there are current/fashionable ways by which to determine stock value and/or future potential value, they may work simply because they are popular - no matter how silly or irrelevant it may seem to me.

I think both of these concepts led to a hypothetical scenario: there are a lot of people doing a very good job researching and interpreting company financials (or, for that matter, astrological charts). After a person makes a decision with respect to value, that person will proceed to make a trade decision. If there are enough people coming to the same conclusion about a company or stock, then the price will change. If there are more buyers then sellers, the price will go up, if there are more sellers than buyers, then the price will go down. It doesn't really matter how they get to the decision - no matter how complex, how strange, how seemingly irrelevant, or how simple.

Principal 2


For there to be a change in stock price, there has to be enough time for enough people to realize trades.

This one is simple as well, but unfortunately for me, rather expensive.

I came to this conclusion while I was attempting to trade on very short time intervals - sometimes within the minute, but always within the day. I found some very successful backtesting strategies, and actually had some very good results on live alert tests based on short intervals, but they just did not work out consistently for real trades. Some days I could do no wrong, but the vast majority of times found me buying, not being able to sell, and then watching as the price proceeded to tank. And then selling and watching it climb back up again. On those days I could have sworn someone was just watching and waiting for me to trade and then calling the market demons to take pleasure in my emotional nail biting agony.

Conclusion:

The big word here is TRENDS. Simply put - a trend in price requires enough people and enough time.

Not so new, and not so exciting, but I this is what seems to be working.

How many people and how much time to constitute a trend? I don't know for sure. For now I have adopted the idea that time is the more critical factor of the two. The longer the length of time, the more people potential involved, and the more reliable the trend. I also assume that there are people in the market just like me - looking for a profit, and at some point in every up-trend, some people will decide to collect their profits. After a stock moves up in price enough, enough people will decide to sell; but the overall price trend is rising, and at some point, enough people will start buying again to continue the uptrend.

That is the basis for my current approach. It is not by any means flashy, and in retrospect, that may be one reason it took me awhile to settle on this - it just wasn't complicated enough for the engineer in me.

Applying the ideas:


Using TD Ameritrade's StrategyDesk, I set up a level 1 window and linked it to daily and weekly charts in Ameritrade's StrategyDesk. I set the level 1 screen to only show stocks that had increased in price significantly over the past year or so and spent some time trying to identify similarities or indicators marking the return to a longer term up trend (up for some weeks, down for a few days, and on the way back up). Working under the assumption that change in price was a good indicator of future price action, I came up with an expression to measure/express the change and added it to the daily and weekly charts. (BTW - Ameritrade's StrategyDesk is incredibly flexible when it comes to level 1 screens and charts and a great tool - I don't think any other brokerage offers the same flexibility and customization at this price level - free with a premier account.) I then flipped thru several stocks looking for common themes in the rate of price changes associated with the daily trend reversals. After selecting a candidate, I came up with an expression to trigger the trade in the backtesting window and then proceeded to run trade simulations over a progressively higher number of stocks and time periods, changing the approach as things worked out or didn't work out.

There are a lot of things to consider while backtesting (I think I am going to do an entry on the backtesting lessons I have learned... of course, all of them learned the hard way). As I was testing only the buy side, I used simple sell criteria (sell at 4% gain) at first. After I had good backtesting results on the buy side, I set a simple sell at a loss criteria (sell at 4% loss) and then refined buy triggers until things worked out. By the time I was finished backtesting, I was using all of the stocks listed on the NASDAQ and testing over a one year period. I tested from Sept. 08 to Sept. 09 and realized a ~93% positive trade rate. I figured I could probably work with this. In total, this probably took me about 2 weeks ~ 60 hours (not sure where I found the time...).

Trading application:


  1. Using a level 1 window in Ameritrade's StrategyDesk, I set up a screen for all NASDAQ stocks. The screen is based on the buy criteria I have backtested.
  2. I check on the filtered results throughout the day. In order to meet the backtested buy strategy, the stock actually has to finish positive for the day - to help ensure I am buying stocks meeting current criteria, I generally wait to purchase a stock during the last 15 to 30 minutes of the day (usually either 500 or 1000 shares - another lesson learned the hard way). However, if I see relatively strong volumes during the day, I will purchase the stock sooner in the day.

Tracking and refining the strategy:


I hope to improve and refine my buy criteria, so I keep track of all of stocks that meet the buy criteria at end of day - along with variables that I believe may be important in gauging future price potential. I consistently review the data. I have the whole collection and review thing down to about 10 - 20 minutes at the end of the day. I have included several charts to give an idea of last month's performance.

The first image (below) presents the percent change in price for all of the stocks that met the buy criteria, for all working days in December. The second and third image present the day ten above average and below average percent gain stocks respectively. The fourth image is a tracking of the average values - the return if I would have purchased all the stocks on the day they met the buy criteria, and sold them all at the end of the month. The calculations assume that the stock was purchased at the end of first day close price. The x-axis refers to the number of working days since the stock met the buy criteria.


(% Gain for all stocks)



(Above average % gain as of Day 10 of 'ownership')


(Below average % gain as of Day 10 of 'ownership')


(Average % gain for all 'purchased' stocks)

(On a side note: I have November and December of 2009 saved using the current buy criteria, but at the end of November I made some serious adjustments to data storage format data. making it much easier to record and process everything. I don't feel like salvaging November's data to work with all the macros, so it will not be presented.)

The image quality is somewhat poorly displayed in the entry, but double clicking on the image should pull it up for better viewing. Image 1 is too busy to follow all of the series, but gives a general sense of the performance. There were 102 buy triggers during December - with some stocks coming up more than once. There were 86 individual stocks. Examining the average chart, the return is +11.9%. The NASDAQ saw a 5.8% increase over the same time period, and I personally realized a 5.6% gain on the stocks I actually traded (unfortunately I do not have a nice graph of personal gains... but maybe next month).

I can't buy all of the stocks that meet the criteria, and at this point I use additional discretion; primarily looking at volumes and average volumes, percent change in close, and my gut. I didn't do as well as I could have, but looking at the performance of the stocks that I traded (after I sold them), I think this is mostly due to my hazy sell criteria.

This data can be used to help determine better buy criteria, but at this point, I think developing something other than my intuition as a selling strategy is a higher priority - even the majority of stocks on the below average chart presented several decent profit opportunities - IF a guy could just figure out when to sell them...

No comments:

Post a Comment