What happened

Shares of CVS Health Corporation (CVS -0.14%) were looking fit last month as the drugstore chain rose on a strong earnings report and as concerns about competition from Amazon seemed to ebb.

The stock finished August up 16% according to data from S&P Global Market Intelligence.

A pharmacist hands some pills to a customer.

Image source: Getty Images.

As you can see from the chart below, the surge came during the middle of the month following its second-quarter earnings report.

CVS Chart

CVS data by YCharts.

So what

Shares of the country's No. 1 pharmacy chain rose 4% on August 8 as the company posted impressive second-quarter results. Same-store prescription volume rose 9.5%, a key driver of the underlying business, and revenue increased 2.2% to $46.7 billion, topping estimates at $46.34 billion. Meanwhile, same-store sales were up 5.9%, and pharmacy same-store sales increased 8.3%, though front-end comps were down 1%.

Gross margin improved modestly in the quarter, which helped drive an adjusted profit per share of $1.69, though that excludes a $3.9 billion goodwill impairment charge relating to the long-term-care business. The adjusted profit beat analyst expectations at $1.61.

Meanwhile, optimism for the company's pending merger with Aetna seemed to grow, as did the belief that Amazon, following its June acquisition of PillPack, was not as big a threat as some had earlier thought.

Now what 

CVS got some more good news early in September on a report that the Justice Department is nearing approval of the merger with Aetna. According to the Wall Street Journal, permission could come within the next few weeks. 

The drugstore chain also raised its full-year EPS guidance from $6.98-$7.08, from $6.87-$7.08, and it sees adjusted EPS of $1.68-$1.73 for the current quarter, slightly below analyst estimates of $1.75 at the time.

Still, the major driver of the stock over the near term should be the pending approval of its merger with Aetna. CVS shares have risen before on indications that the combination will go through and are likely to do the same if it gains full approval.