For much of 2012, troubled pharmacy chain Rite Aid (RAD) seemed to be pulling itself up by its bootstraps. It benefited from a dispute between Walgreen (WBA 1.99%) and Express Scripts (ESRX) that forced many former Walgreens patrons to fill their prescriptions elsewhere. Furthermore, the company saw improved sales at stores that it remodeled to a new "wellness" format. In Q3, these sales drivers culminated in Rite Aid's first quarterly profit since 2007.

However, Walgreen and Express Scripts finally settled their long-running dispute last summer, and Walgreens stores rejoined the Express Scripts network on Sept. 15. Moreover, at the same time the company rolled out its first loyalty program, called "Balance Rewards", as part of a push to win customers back from Rite Aid and CVS Caremark (CVS -0.33%). While it's too early to be sure, it appears that Walgreen's resurgence is squeezing Rite Aid again. Rite Aid has a heavy debt load of roughly $6 billion and is much smaller than Walgreen and CVS -- two major competitive disadvantages. Rite Aid is therefore a very risky investment and should probably be avoided.

Sales momentum tapers off
Rite Aid's strong Q3 earnings were the result of 1.1% same-store-sales growth in the front end (non-prescription sales) and a 3.6% increase in prescription count in comparable stores. (Overall, same-store sales decreased 1.5% because of the introduction of new lower-cost generic drugs.) However, performance was strongest early in the quarter, before Walgreen had a chance to win back Express Scripts customers.

Q4's performance could have been much worse, if not for the bad U.S. flu season. Front-end sales decreased 1% in December while prescription count increased 4.4%, including a 170-basis-point gain from sales of flu shots and flu-related prescriptions. January was even stronger, with the front end up 4.2% (2.4% attributable to flu treatments), and prescription count up 5% (3.4% resulting from flu-related prescriptions). However, Rite Aid's momentum dissipated with the end of flu season. With no flu-related tailwind in February, front-end sales dropped by 1.3% and prescription count increased by a meager 0.3 %.

Turnarounds are expensive
Rite Aid once again faces two stronger competitors in Walgreen and CVS. Convenience is a key competitive advantage in the drugstore industry, giving larger chains such as Walgreen and CVS an edge. I'm skeptical that Rite Aid will be able to successfully fend off this competition in light of its fading sales momentum and weak balance sheet. A case in point is the rollout of the "wellness" format stores. While these stores outperform the company average, Rite Aid has been remodeling stores at a rate of only 110 to 120 per quarter. At that rate, it will take roughly a decade to convert all stores to the new format. However, Rite Aid's weak balance sheet and limited cash flow make it difficult for the company to invest more aggressively in its stores. Ultimately, Rite Aid's weaknesses outweigh its strengths and make it a poor long-term investment candidate compared with Walgreen and CVS.