The market has been relentless in punishing stocks that miss expectations, whether it's due to blizzards on the East Coast or more internal factors. Walgreen (WBA 3.69%), though, can apparently do no wrong. The drug store chain this week missed quarterly profit expectations, yet shares still rallied as Walgreen did achieve record sales and a record number of prescriptions filled. Walgreen and its peers have a perennial wind at their backs with more people taking more medication all the time. One of the big keys to keeping investors and analysts happy has been improving the front of the store, where margins are lower but retail space abounds. Is Walgreen as desirable as the market thinks?

Solid quarter
Sales climbed slightly more than 5% to a record $19.6 billion in Walgreen's fiscal 2014 second quarter, driven largely by an appetizing 4.3% climb in same-store sales. These are especially promising figures, as many retailers took a hit due to weather conditions in recent months, and the recurring patent cliff (in which branded drugs become generic ones -- a great turn for drug stores given the higher profit margins of generics) is at a sluggish point, keeping additional margin pressure on prescriptions.

Like many private label versus branded goods, retailers purchase generic pharmaceuticals at a much lower price than their Pfizer, Merck, and other major drug-maker counterparts. The drugs, which can be sold at much lower costs to the consumer, often see increased demand.

The bottom line felt the margin pressures, as earnings dropped an adjusted 5.2% to $0.91 per share. For one thing, the patent cliff was at a peak in the first quarter of last year, making this year an especially difficult comp in addition to being a low point in the cycle. Why would last year's first quarter affect this year's second?--The peak of last year's Q1 carried sales higher through Q2. 

The market didn't care, and appropriately so. Walgreen has plenty of long-term bullish indicators to make the year-over-year drop a nonevent. The patent cliff situation should cycle back into positive territory by the last leg of 2014. In the meantime, Walgreen is keeping costs controlled and continuing to focus on increasing the profitability of the front of store. Front-end comps were up 2% in the recent quarter, which again reinforces the effort in light of extreme weather. Average basket sizes are increasing, and the company is capturing greater market share in the daily living category.

Anything not to like?
From an operational and managerial point of view, Walgreen leaves little on the table. The company's retail pharmacy market share is nearly 20%. Its stake in European pharmacy juggernaut Alliance Boots (a $6.7 billion deal sealed midway through 2013) is on track to deliver better synergies than previously thought.

Interestingly, the company intends to close 76 locations throughout the year. For a company whose strategy is basically to have stores on every corner in America, it's refreshing to see some attention to store-level performance. Management noted that it was looking over density data, real estate positioning, and trends in the stores' immediate areas. Despite its 8,000+ retail footprint, the company seems to have its finger on the pulse of each individual store.

At 17 times earnings, investors aren't getting a bargain on shares, but they are buying a company with great long-term potential. At the current level, Walgreen stock has its fair share of downside risk, but growth seekers should pay close attention. This is one of an increasingly few brick-and-mortar businesses that is only going up.