Sector investing can be an important methodology to boost the value of your portfolio, but it can also wreak havoc with your returns if you don't do your homework. Sonic (Nasdaq: SONC), Bob Evans Farms (Nasdaq: BOBE), and The Cheesecake Factory (Nasdaq: CAKE) are restaurant chains in the "consumer discretionary" sector of the S&P1500, and they deserve your consideration.

Consumer discretionary companies offer products and/or services that are "wants," not "needs." It is important to consider the sector, because when times are tough, most of us will forego discretionary purchases in order to spend scarce cash on things we need.

How do you do your homework, and what is earnings quality? In the hierarchy of metrics affecting a company's reported earnings, revenue is most important, followed by cash flow and, lastly, net income. Still, Wall Street focuses on revenue and earnings per share for the period, along with the company's future guidance. In other words, analysts often use the wrong metric as the basis for their recommendations to buy, hold, or sell a stock. Prudent Fools should always make investment decisions based on consideration of earnings quality. Doing otherwise could cost you some of your hard-earned money.

Sonic

Sonic operates and franchises approximately 3,500 drive-in restaurants in the U.S. As you can see from the chart above, Sonic's revenue looks stable, but Sonic's story is all about cash flow. The chart above shows operating cash flow tracking seasonal revenue fluctuations, but, like revenue, the cash flow trend is fairly flat. Some good news here is that Sonic's operating cash flow has remained positive, with a healthy margin of 15%, since 2010. Positive operating cash flow can be seen as having cash in a checking account. The operating cash flow margin measures how well a company converts sales into cash to be used for operations, expansion, dividends, or other needs. A higher operating cash flow margin means the company does not need to borrow money or issue debt to fund its operations.

Speaking of long-term debt, Sonic's debt level is high at $504 million. However, in 2011 the company swapped high-cost debt for available ultra-low-cost debt, and it has made progress paying this down. How? With cash, of course -- and Sonic shows an improved price-to-operating-cash-flow ratio of 5.9 times, versus its historical ratio of 6.9 times. This means Sonic's stock price has room to rise -- and indeed, since January it has risen from $6.95 to $8.05, or 15.8%.

Bob Evans Farms

Bob Evans Farms owns and operates 564 full-service restaurants and seven general stores under the Bob Evans brand in 18 states, as well as 145 Mimi's Cafe restaurants in 24 states. Bob Evans' chart resembles Sonic's, as revenue is stable and operating cash flow is steady and positive. However, the chart shows that BE's operating cash flow margin is lower than Sonic's at 9.6%. This means that Bob Evans generates less cash per dollar of sales and operates less efficiently.

As expected of most restaurant chains, Bob Evans turns its minimal inventory quickly. Days in inventory are only eight. Lower inventory means there is less drag on revenue in the form of cost of goods sold on the income statement.

Bob Evans is effectively managing its accounts receivable and payable, both of which affect cash flow. Cash is also affected by debt, and Bob Evans has a modest and shrinking long-term debt exposure of $97.15 million. This is good news, because it will need less cash to pay down the debt.

Bob Evans' stock price has risen from $33.73 in January to $39.66 currently, or 17.58%. The company pays a dividend of $1, or 2.60%.

The Cheesecake Factory

The Cheesecake Factory operates 170 dining restaurants under The Cheesecake Factory, Grand Lux Cafe, and RockSugar Pan Asian Kitchen brands. The chart above shows revenue growing, but again our focus is on cash flow. Operating cash flow has shown slight average improvement year over year since 2010, and the operating cash flow margin is 10.4%. Cheesecake's metrics affecting cash flow are very low, which allows them to convert sales to cash quickly -- a great thing! Since January, the company's stock price has increased 6.2% from $29.36 to $31.18 currently. The company carries only $54.68 million in long-term debt, down from $155.21 million two years ago.

All three restaurant chains are rated as an "A" for earnings quality and would make a sound addition to your portfolio. Because Sonic's cash flow is strongest, I would start there. But then, Bob Evans' dividend is enticing.

Over the years, small-cap stocks like Sonic, Bob Evans Farms, and The Cheesecake Factory have provided market-beating returns, provided they're value-priced and have solid businesses. Read about a pair of companies with a lock on their markets in "Too Small to Fail: 2 Small Caps the Government Won't Let Go Broke." Click here for instant access to this free report.

Add Cheesecake Factory to My Watchlist.

Add Bob Evans Farms to My Watchlist.

Add Sonic to My Watchlist.