Shares of Family Dollar (NYSE:FDO) hit a new 52-week high this morning, after the discounter posted healthy quarterly results.

Sales rose 8.7% to nearly $2 billion during the company's fiscal second quarter, fueled by a 6.4% increase in same-store sales. Earnings grew even more, 33% to $0.60 a share.

Yes, both gross margins and net margins inched higher at Family Dollar. It's a point worth emphasizing, because margins contracted at the more conventional discount chains such as Wal-Mart (NYSE:WMT) and Target (NYSE:TGT) over the holidays. Yes, shoppers are flocking to discounters in recessionary fashion, but they're sniffing out the best markdowns.

Family Dollar customers loaded up on the chain's lower-margin consumable merchandise. Thankfully, that was more than offset by lower markdowns, freight expense savings, better inventory management, and generally higher markups.

The second-quarter results didn't take Wall Street by surprise. Analysts figured the company would post a profit of $0.60 a share. The real juice behind today's stock gains comes from the company's near-term guidance, which Family Dollar has upgraded. It sees a profit of $0.54 - $0.58 a share for the current quarter. Analysts had settled on the $0.50 mark.

Investors have recently warmed up to closeout, thrift, and dollar-store specialists such as Big Lots (NYSE:BIG), 99 Cents Only (NYSE:NDN), and Dollar Tree (NASDAQ:DLTR). They are generally seen as retailers that should weather the economic downturn well. Family Dollar raises the ante with its attractive balance sheet.

Havens of thrift are magnetic when money is tight. The real challenge for investors, however, is to weed out the bargain stores that are shredding margins. Family Dollar has proven it belongs on the short list of retail longs. Value hounds may point out that chains such as Big Lots and Dollar Tree trade at lower earnings multiples than Family Dollar. They're right, but sometimes you have to pay up to land a bargain.

Other games to play: