By Paul R. La Monica, CNN Business

This has been a brutal year for the big drug store companies.

Walgreens' stock is down more than 10% this year, making it the worst performer in the Dow. CVS has been an even bigger dud. Its stock has plunged nearly 15% year-to-date. The broader market is up more than 10% this year.

Both chains are facing significant challenges, but for different reasons.

Walgreens has been hit by a crackdown from the Food and Drug Administration, which said last week that it was putting the company "on notice" for selling more cigarettes to minors than any other drug store retailer.

The FDA now wants to meet with Walgreens to discuss the sale of tobacco and e-cigarettes to teens. The FDA also announced a broader crackdown on flavored e-cigarettes and cigar sales to kids on Wednesday.

CVS doesn't have a tobacco problem. The company stopped selling cigarettes in 2014, citing the fact that carrying tobacco products was "inconsistent" with the company's broader mission as a health care company.

But CVS shares have tanked this year because of worries about its recent acquisition with insurance giant Aetna. CVS CEO Larry Merlo said that 2019 will be "a year of transition" as the company works to integrate Aetna.

Randy Hare, director of equity research at Huntington Private Bank, told CNN Business that lower prices for generic drugs and a persistent decline in reimbursement rates for medications from state and federal government health care plans is a problem for both CVS and Walgreens.

That isn't helping Rite Aid either. That chain, which recently sold a big chunk of its stores to Walgreens, announced Wednesday that it was cutting 400 jobs and that its CEO was leaving.

Competition hurting both Walgreens and CVS

Hare, whose firm does not own any of the drug store stocks, said that increased pharmacy competition from Walmart and Amazon is hurting CVS and Walgreens. Amazon recently bought online pharmacy PillPack.

He added that the drug store chains are also getting squeezed by Costco and dollar store chains like Dollar General, which offer a lot of the same products that you can get at the front of a drug store for much lower prices.

Hare said that Walgreen looks like it might be in better shape than CVS for the short-term, mainly because the company doesn't have as much debt as CVS does following the Aetna purchase.

"It's the dog with the least fleas," he said, before adding that Walgreens does face challenges that CVS doesn't -- most notably a bigger presence in sluggish European markets, because Walgreens also owns UK-based Boots.

Hare pointed out that Walgreens also still has the FDA tobacco overhang.

"In the front end of the store they try and kill you and in the back end of the store they try and save you," he quipped.

CVS may be in better shape as it shifts to insurance

The broader focus on healthier living might ultimately make CVS the better bet than Walgreens for the long haul.

Lance Wilkes, an analyst with Bernstein, started coverage of CVS Wednesday with an "outperform" rating and argued that all the bad news about competition in the pharmacy market are already priced into the stock.

Aetna will account for nearly a third of the company's total sales this year, and Aetna's growth rate will be faster than the retail and Caremark pharmacy benefits management businesses, Wiikes said in a report.

CVS is morphing into a company that's more like insurance giant UnitedHealth than a retailer. That should be good news for investors. UnitedHealth's stock is up more than 200% in the past five years while CVS has fallen nearly 25%.