Tuesday, January 14, 2014

Do It Yourself Stock Picking: How To Rank Stocks On Your Own

There are thousands upon thousands of individual securities in the stock market, plenty of ETFs and mutual funds also in the thousands and an almost overwhelming number of stocks to choose from. Yet time is of the essence and what is a good buy now may not be a good buy in a month, or even the next few minutes. If you aren't wanting to pay thousands of dollars for services that force you to react to their information and as a result always lag their signal (and be late to the punch), then you will have to identify the setups yourself in as close to real time as you can. That requires an initial setup time that may be quite a bit of work, but can be very rewarding and help you understand how some other services might rank stocks. Ultimately you have to choose the stocks, so it makes sense that you find the stocks that work according to your style and personality, and risk tolerance and things of this nature. For example, a growth investor and market timer probably will actually often prefer a high P/E that means the company is given a premium because of it's growth prospects and capable of big movements and market technicals that show upward movement. A value investor actually wants the lowest P/E along with other metrics of value such as book value, price to sales, long term history of positive fundamentals, and likely downward, oversold price movement that provides a very affordable price to buy other people's panic.

So to start with you need to compile a list of all the securities you want to look at. I use finviz screener and I filter out ETFs with the idea that I can pick a small basket of stocks in that area if I wanted to go that approach and select them better most of the time.




Once you go there there is a "custom" button that allows you to click on "settings" to provide information that you want about each stock, ranging from fundamentals, technicals and general information about the stock/company. I have a free account so it saves my preferences.

What you will want to do is select all the information you consider relevant to your stock ranking methodology and select it, then scroll down from the custom tab and select export. You will have the opportunity to open or save in excel (or some other spreadsheet software). I choose open as I can save later, OR copy and paste the data into a prior sheet I have saved.

The most difficult part of this process is coming up with a ranking system. While this may be easier to follow if I just gave you my ranking system, in order to truly teach you how to construct your own, I must try to explain the complex details that is more difficult to explain and may get confusing. Fear not, for I will come up with another post later showing you my ranking system entirely... but for now... here comes the complexity.

Ultimately I like everything graded on a scale of 1 to 100. As such I want every component that goes into the ranking ranked on such a scale. Some components will be "better" if the rankings are low. So I will ultimately need a numerator and denominator in the formula that divides the average of all the highest numbers by all the lowest numbers.

To make the spreadsheet efficient you may want to use the IF function in the spreadsheet. IF market cap is greater than 50M, display market cap, If not, display "Too Small" in the cell. Since data is displayed in the millions, I need data greater than 50 in the market cap section.
That formula will look like this
=IF(G2>50,G2,"Too Small")
where G2 is the cell that contains the market cap information.
If you prefer, you can have it display the value 0 and that way you can multiply all the values together and IF that formula equals zero then you can have it display "filter out" so you know not to include the stocks in your rankings.
=IF(G2>50,G2,0)
I also will run things like a liquidity qualifier where the average volume times price (market cap traded per day) must equal more than 200M.
So the formula in excel will look like this
=IF((X2*V2)>200,(X2*V2),0)
where X2*V2 is price times average volume.
Some data will be unacceptable no matter how good the other data is. These are the ones you want to filter out via this method. But most data will be just of "lower ranking" if certain data is bad, which the formula will be able to mostly handle.

You may be tempted to delete the columns you don't use. Be aware that you will have to remove them from the screener, otherwise the next time you import the date it won't align.

Why do I sort and filter data in excel, instead of using a filter on the screener itself?
A couple reasons. First of all, I may not want to filter market caps under $50M out, but $25M or $75M. In this case, there are no values. Secondly, I may want to include those under $50M in the system and provide a different ranking formula, or make exceptions if the other numbers are off the charts.

Ranking data on a scale of 100:
I believe there is a better way to do things, but until I take the time to learn more about excel, I will have to do this somewhat manually. There are a few ways, one where you value according to "percentile" and another where you use a fraction of the best performer. We will first discuss using a fraction of the best performer. So simply sort from largest to smallest, and those with the greatest data such as ROE will be the divisor. Say the largest ROE out of all eligible (those not filtered out) is 917.4% (9.174) You would take the ROI of each cell divided by 9.174 and then multiply the total by 100. You may also use the average of the top 25% as the divisor, and ANYTHING over 100 (by using the IF formula) will be displayed as 100. This method has pros and cons. This more effectively measures the difference between the best ranked and worst ranked and does so to scale, but may still provide a very poor ranking even when the data is well above average. Since ultimately you are coming up with a weighted average, the method of having good results ending up being considered pretty poor could make it a bit difficult to really get a sense of if the numbers are considered "good" or not, and those with one big good number out of all the metrics could skew all the results of every other metric in some cases.

"Percentile ranking" is different because if the top ROE is a million and everything else is below 100, even the second best name would get a real low ranking out of 100 using the above metric (or if the average of the top 25% is dramatically different, same thing). With percentile ranking you are merely sorting and measuring each as 1 out of the number of eligible stocks and providing a percentile, then taking the sum of all those above to give you the top X% or 1 minus that number gives you the percentile. The issue with this is it does a poor job of showing you when some data has a dramatic difference from the other, but may be ranked similarly because of their proximity in the rankings. i.e. if the top 3 results are 100M, 50M, 20M and the next best result is only 20,000... then the 4th result will still be ranked very similar to the 3rd result, even though the results are dramatically different in value. You may consider a weighted average of each outcome to factor in a combination of each of the numbers, but doing so each time for every single measurement you consider relevant to the ranking system is quite a lot of work. In the case where high is an undesirable outcome such as value investors might treat P/E, you can either invert the number (e.g. 1 divided by P/E) before running the rankings, formula, etc , or you can simply take your total 1-100 scale and subtract 100 from the total.

Ultimately you will take all the rankings that are ranked from a scale of 1 to 100 according to your preferences, and multiply each number by a fraction or percentage point that corresponds to the "weight" (importance) of each variable. All of the "weightings" should add up to 1 (100%) so that you get a number where the best possible total if it was #1 in every category would be 100. (Or in some cases, over the threshold in which you determine all numbers above it should be displayed as a score of 100).

If you do this, you should have a spreadsheet that simply requires an export, a copy and paste to update the totals, a sort to check that the highest (or perhaps lowest) numbers haven't changed, and then a sort function on the totals to rank the stocks from best to worst according to your OWN methodology.

Some variables may require a bit more thought. Some may consider an overbought RSI as a bearish signal, where as a high but not overbought signal may represent positive buying and momentum that has not yet reached an extreme. You may want to isolate the sectors and then industries to provide some ranking system for the sector and industry it is in based upon the average performance of them.  That is possible with sorting and a bit more work. I prefer to code the sector and industry.

One might try a VLookup function in order to look up values from data that only contains certain values
http://office.microsoft.com/en-us/excel-help/vlookup-HP005209335.aspx
Or A Pivot Table in order to combine those that contain the same SECTOR and/or Industry and rank the group as a whole either by average or total.
http://fiveminutelessons.com/learn-microsoft-excel/how-create-pivot-table-excel

I would probably do all the sorting and ranking first, then perhaps modify the weightings or make additional categories for data that applies to the sector. For example, I might be more willing to buy an individual name in an overbought sector or industry than I would in an overbought stock. Thus, I may create a different ranking on scale from 1 to 100 based upon RSI that applies to industry and/or sector differently than it applies to the individual stock.

Hopefully I have provided enough data for you to have a broad idea of how to create your own stock rankings. In a future post I plan to actually go through the busy work of coming up with a ranking and then describing the process.

Tuesday, January 7, 2014

Understanding the rotation part 2

In the last post I went through some of the rotation that I expected by identifying mega cap names and then evaluating the group. Some groups are better than others but I will continue with the following groups just to show you how I go through the process:

education training services group
business services group
biotechnology group
aerospace defense major diversified group
synthetics group
------------------------------------------------------------------------------
(keep in mind this post was written 1/6 and only submitted later after some editing)
education training services group
There are no companies over $10B which make the liquidity cycle analysis difficult and different. However, between $1B and $4B there are still enough quality setups for me to expect the rotation to unfold there first, and then as that occurs those under $1B will begin to have more and higher quality setups. So there is still some market cap analysis that can be done. There are a lot of names consolidating just under the highs. Then there are those with a lower high that have yet to really establish a higher low and then lower quality setups. There are no real short squeezes happening just yet and the high short interest names are mostly lower quality setups which confirm that we are in the "laggard" phase.
I'm not in love with any setup here just yet at least from a timing perspective but I will keep my eye out as I think this space has long term promise and it is starting to rotate into favor and there are a lot of names developing some kind of pattern during this consolidation phase but which still need more time.

business services group
In terms of the liquidity cycle, I don't really like anything under $4B at this time. That isn't to say that there aren't plenty of potential individual plays, but there are a lot of toppy looking patterns and break downs and those making lower highs or near their 52wk lows. There are some individual ones that defy the trend, but those are the exceptions and eventually the leaders when there is an appetite for the group. This is too early on in the rotation for me to really like at all personally, so I would stay away and look for something better, but if I had to, I would be "okay" with ATHN and maybe PCLN although it probably needs some sideways work, it has a tendency to rally off the dip and run.

biotechnology group
This group is difficult to analyze because of the dependency of FDA to move the stock creating a much more diverse group that is driven by their product pipeline, rather than the industry theme. Even so, I think as a whole the group is setting up well and has been a hugely bullish theme the last few years as you can use the BBH to see the strong trend. Fundamentally, I love the space as a whole because the innovation that is happening with RNA,DNA, stemcells, genetics, and various cures and even potential 3-d printing of biomaterial, etc I believe is a gamechanger that may take 5-10 years to develop but is still a major tailwind in the price. When sorting by market cap I see hardly any correlation between setups and market caps. There is a very diverse group at every level. This can be an extrodinary opportunity for those that really learn the space inside and out and learn to trade it as the market direction makes almost no difference, the space itself almost makes not difference, and as a result if you can learn to get a lot more upside than downside, you can make lots of individual trades in this space without worry of getting too exposed to market risk. Simply manage individual position risk and you should do fine. In other words, being able to have 20 individual bets that may overlap any given time period means much less risk of a sudden market, sector, or industry drop or tightening of overall economic liquidity. and thus you could have 20 2% positions and it would in some ways be much less risk than having say 10 4% positions in say the metal miners space all at once. Although individually the stocks move a lot more and are vulnerable to wider sings and more volatility and thus you may want to reduce your position size PER position, the overall exposure to the space need not to be as limited. The difference is similar to a choice between betting 40% of your money on a 3 to 1 payout with 1 coinflip, or having 40 1% positions on individual separate coinflips.

So in terms of "risk cycle", I don't know if it applies either. Basically none of most of the analysis I do is relevant other than price action and past price/volume history and sentiment, but even that is not as effective because one major FDA approval failure/success could completely change the picture. You can try to game whether or not the market is overly optomistic about pending results and try to handicap it the way a professional gambler might handicap horseracing or sports teams, but I don't think the edge will really be all that significant compared to what I might do with other trades. Price action BETWEEN events might allow for some trading but I think you really have to work with fundamentals, burn rates, product releases, the number of products in pipeline, research/devlopment, etc to really have an edge and that requires you to really invest in the longer term. And if you do that, some are still going to go to zero so you have to have much smaller position sizes and treat being long the stock like being long an option in that you have to expect the downside to be zero, and let the upside run to hundreds of percentage points or more.

This is enough to go on but I feel like I have more of an edge with other picks, even though I love this space and being good at picking biotech is much more benneficial to one's portfolio because of the near zero correlation with anything else you will have in a portfolio and most correlation just being coincidental or related to overall confidence. I could go through some picks here but they are only based upon typical risk/reward analysis where I look at upside and downside target, but that does nothing to really increase the probability of being right on both a bullish move occurring and increasing the precision on the timing which is why I go through this process. I will cover that in another post some time.

aerospace defense major diversified group
There aren't enough names in the group to really analyze but overall the space has been in strong bullish trend. I am less confident in any pick from this space because of lack of ability to thoroughly analyze. So again, I haven't done a lot to increase the probability of being right over the typical trader, other than identifying a lot of capital moving in lead by the largest caps in a strong trend and the individual setup, with limited names though, it is good that they all look mostly somewhat bullish.
If I had to pick:TXT

synthetics group
Same thing, not enough in the group but overall space is decent. However, I will say that the 3 largest caps look short term bullish as they have turned up from a low and consolidated below highs. Not ideal but decent. I might play AXLL or TROX if I had to.... but I don't.

Monday, January 6, 2014

2014 Theme. Large Cap Fueld Rotation.

Right now the theme I am looking for for the foreseeable future is that the largest market play4ers are going to rotate into the asset class of stocks in the long run, which will fuel a rotation. The way it works is the mid caps and larger will rally and those in that stock will want to keep exposure in that industry so they will take advantage of the premium and rotate into some mid and smaller cap stocks fueling some explosive moves.

As such, I am working on different ways to slice the market up and identify the rotation.

I am using finviz custom export function to come up with some of my own formulas.
Basically I want all of the $2B+ companies that have moved over 10% in the last year that are contracting in volatility (I sort and take the top 100 names with greatest difference between weekly volatility and monthly.). THEN, I take those names and manually view those undergoing consolidation that look decent for a setup. The explosive move is not the rotation into the largest cap names but instead the small, so now I have to take the list of about 10 names total and break down the individual industry. I will then be looking for the names that are setting up in a consolidation that haven't moved. Ideally from these 10 or so names I will find an industry where ALL names are setting up together because that confirms that a LOT of money is ready to buy anything and everything related. However, through my understanding of the liquidity and risk cycle I can also try to identify what is "next" up to bat and in the deck and find a good location to buy one of those names.

To be more specific, the large cap names that have rallied HAVE to have received large inflows of capital to drive the price higher. With a stock that big there is a huge market so it has to be driven by a big buyer to take out the supply at the current price and move the stock higher. Given stock has consolidated means that there is a battle between bulls and bears. Eventually you will see the supply consumed (or the demand stops) and the stock will then tend to make a big explosive move.  The consolidation (basically regardless of if the money continues to flow into the big cap name or not) means that someone is getting ready to move a lot of money and even if they sell it, with the stock up 10%+ on the year, they have gains in which they can rotate into some smaller cap names if they wish while the big buyer is likely to continue to drive up the price.

So I started with these 10 names. You will notice some are duplicate industries (a handful of biotech). This is actually really good because it potentially suggests a bull market in that industry already.

txt,apol,avgo,axll,gild,athn,mtg,yndx,thrx,regn,

Now I will look at each industry seperately for ideaas.
http://finviz.com/screener.ashx?v=111&f=ind_semiconductorbroadline
http://finviz.com/screener.ashx?v=111&f=ind_propertycasualtyinsurance
http://finviz.com/screener.ashx?v=111&f=ind_internetinformationproviders
http://finviz.com/screener.ashx?v=111&f=ind_educationtrainingservices
http://finviz.com/screener.ashx?v=111&f=ind_businessservices
http://finviz.com/screener.ashx?v=111&f=ind_biotechnology
http://finviz.com/screener.ashx?v=111&f=ind_aerospacedefensemajordiversified
http://finviz.com/screener.ashx?v=111&f=ind_synthetics
======================================================
Now I can figure out what range of market cap the liquidity cycle is in... For example if all the 10+B companies have moved, but then you start to get in the 2-10B range and you start to see more laggards, but you see some of the midcap names in the sector leading, you probably will be seeing a rotation into those names sooner.

Then I might sort by RSI (relative strength index) or % off highs and try to slice things up that way to really see which specific stocks are next. Finally I look for the highest short interest names and see if we have seen a lot of short squeezes or not. This helps me to quickly assess where we are in the risk rotation cycle and within those groups I should be able to spot opportunity.

The fact that I start with mid cap, large cap or mega cap that has at least begun to consolidate means we probably have already seen at least the mega cap move from in cycle to out of cycle. That's good because I am looking for the NEXT move.

So for example the property casualty insurance group has seen moves and a lot of them are near their highs. With such a wide range I have to wonder how many "laggards" are left. But as I get into the $8B and less range some laggards start to appear more frequently. This tells me the liquidity cycle has hit all the companies over $10B and is moving down from there. As I sort from those off of 52week highs it is not until I get to a few pages in that I really see those lagging. Then I begin to see a lot of trashy names too. I check the "high float short" names and really don't see many names near highs and of those that are, I don't see any real rip above previous ranges since the last cycle around JULY 2012. So that tells me that we are probably still in the "laggards" part of the cycle and the shrot squeezes won't start to heat up until we see more of the laggards rip. So, that really narrows the field down I am looking for a name in the sector under $10B but probably over $1B as that is when you start to see too many names that have drastic sell offs that haven' found support. Within that group you want a name consolidating off of its highs and having a high float short interest isn't really all that necessary. I have limited the names from 80 to about 5.

property casualty insurance group: re,y,wrb,mtg,ffg
Then I can determine personal preference from there. I usually scan the charts more in depth looking at the 5 year charts and the 10 year charts as well as the short term to see if I can see anything I really like. I probably would go with MTG because it hasn't had as sharp of moves downwards over the last few days, and has a huge volume profile above on the 10yr chart giving you the opportunity for much larger than anticipated gains if you let your winners run beyond your target and just manage it afterwards looking for signs of it weakening.
pick:MTG

semiconductor broadline group: Mid caps are lagging again. The small caps are doing decent which is fine since they represent greater risk so it actually is good for the group, but makes things a bit more difficult to anticipate a rotation into the mid caps. In this case, the mid caps actually look a bit too ugly so you may want to see some more mid caps doing well first. I'd like to see at least one or two mid caps ripping to new highs or consolidating off highs.  I don't really like many of these names, I could take a smaller cap name since they are moving well but I only like ATNY. AFOP and MLNX are also "okay"

pick:ATNY

internetinformation providers group
This space is impressive. Lots of great setups which is usually a very good thing as it means the setup is not some "fake out" and is less likely of being "fooled by randomness" (failed setup). There are actually a few large caps that aren't working out and many that are working well and setting up for another move upwards. There are plenty of mid caps but when you get under $2B there suddenly are a lot of poor charts mixed in with some really good ones which means the liquidity cycle for the most part is not yet ready to have an appetite for them but be ready to look for that group setting up in the future AFTER some of the mid caps go. Since the group is so strong overall, I am not concerned too much with a handful of names between 1 and 2B not setting up well and may even be inclined to look for setups under $2B ANYWAYS because I already have enough confirmation that the group is undergoing a rotation. Nevertheless, if I want to try to time the sector with more precision and higher probability as opposed to going for the smaller cap which tends to make larger moves, I would stay away from the under $2B group until you start to see some of those over $2B that are set up break out, THEN you may want to buy under $2B and eventually sell your over $2B and then rotate that capital to some MORE names under $2B in the space. I want to just use this to illustrate that all of the ways I slice up a market are only used as filters by which to interpret the market. Since in this example I have already a ton of confidence in the group and like the way the group is filled with big moves on the breakouts, I won't necessarily hesitate to trade the smaller setups too... however in terms of timing, if I am to use options or have an expectation of when the move will ork THEN I have to be sure that I buy more time with those under $2B because the timing should be more hit or miss until some of the larger cap goes.  Now the risk cycle certainly also plays a role here. You have plenty of names already at or near new highs and then you start to have some laggards still showing up that are just off of the highs but consolidating (BCOR,WWWW,OPEN,TRIP,AKAM,MOVE,BITA). Then you start to get a bit farther away from the highs and the names aren't quite ready for prime time yet and not only that but this is confirmed by the quality of the setups declining and those farther off highs are not consolidating and providing the right type of set up as frequently at this time. You could also slice this up by looking at USA vs China names to see which setups are better but that's for another time.  Short squeezes? Only YY and YOKU (both China names) are really "in phase" of a short squeeze although a few have moved and have paused and are now ready for another leg up. So I like a name like OPEN,TRIP,BCOR which is not only a laggard, but a short squeeze candidate and around the market cap of what's next in line to be in favor. The reason being that I can hold for a bit longer and get the rotation from two potential cycles as well as position myself in case I am interpreting the timing a bit off, where as if I went with just a laggard without short interest and it simply wasn't moving because there was a reason no one wanted it that once it cycles out of favor it could really get hit. If the space continues to heat up you could see a major short squeeze where the high short positions go simply because the shorts are under pressure and the bulls know they are in a position where they may have to cover at the market so they can attack.

picks:OPEN,TRIP,BCOR

I will not continue the process today for time constraints, but I will get to the other groups later perhaps.