SQL Optimization

Given a data base (like MyFin2 available for download) of companies whose parameters vary widely. How can one determine the best companies of these ? Any mediocre business student can tell you one would like the most growth at the least cost as is demonstrated in this table:

Figure 1
4 Value Parameters 2 Growth Parameters
P/E ROE Debt/Equity Price/Book Rev Qtr/Yr Ago EPS Qtr/Yr Ago Rank
low high low low high high low

The Rank is derived from the other parameters, and represents an alternative statistical measure for finding the best companies. Sql provides many methods of targeting those companies we like best. Suppose we wish to eliminate companies where ROE is negative (or as Jack Welch might say less than the T-bill rate). Debt/Equity < 1 might be another tempting filter. Who wants to pay for a company that has more debt than peers ? or is priced higher. However in real life the rules can get much more complicated. With healthcare companies for example negative ROE is often the norm. In grocery stores Debt/Equity > 2 is common (ge is over 4).

Perhaps the easiest way to use Sql is to create a subquery driven by a table (which could be the results of another query). The Query can eliminate companies whose values are below those in the table marked low in our table above. Conversely we will keep companies whose values are above those in the table marked high in the figure 1 above. To see this idea Graphically the red bars are marked high in the above table while green is low.

The point of this is one can build this subQuery according to many different styles. For example one could ignore growth, and look at value, or conversely. One could use Means, Quartiles, Medians, or almost any statistical aggregation measure in the subquery as well.

George Elgin
Questions or Comments