The stock market lost some ground on Wednesday as investors reacted to a number of events on the macroeconomic and geopolitical fronts. A weak reading on inflation made some investors more optimistic that lower interest rates are just around the corner, but doubts about whether the U.S. will be able to reach deals with China and other major trading partners in the near future weighed on sentiment. Even with major benchmarks lower, some stocks picked up ground thanks to good news for their businesses. Alteryx (NYSE:AYX), Comstock Resources (NYSE:CRK), and MagnaChip Semiconductor (NYSE:MX) were among the top performers. Here's why they did so well.

Alteryx gets a follow-on boost from analysts

Shares of Alteryx continued to pick up ground, rising 9% after seeing a sizable gain on Monday in the wake of news that competing data analytics specialist Tableau Software would be acquired. Today's gains came following favorable comments from analysts at several different companies, with some seeing Alteryx as the top player in the industry. Analysts at Needham boosted their price target on the stock by $12 to $120 per share, arguing that customers seem to be positive about their experience. D.A. Davidson was more circumspect, raising its price target by $9 to just $95 per share but suggesting a much higher valuation of as much as $130 if Alteryx's own targets prove accurate. Some shareholders also hope that an acquirer will step in with interest in buying out Alteryx at a nice premium.

Two hands with letter a above them, with slogan.

Image source: Alteryx.

Comstock keeps climbing

Comstock Resources saw its stock jump 9%, gaining momentum from a key acquisition announced earlier this week. On Monday, Comstock said that it would purchase Covey Park Energy for $2.2 billion, giving it huge exposure to the Haynesville Basin shale play area in the Ark-La-Tex region. The move only doubles down on Comstock's already heavy exposure to natural gas, the price of which has sunk lately in light of poor supply and demand conditions. Nevertheless, given Comstock's relatively low costs, it's in a position to handle the tough environment, and a $475 million capital infusion from Comstock majority shareholder and Dallas Cowboys owner Jerry Jones helped seal the deal. If natural gas recovers, then investors will likely look back at the purchase as a highly opportunistic move.

MagnaChip sees better times ahead

Finally, shares of MagnaChip Semiconductor rose 12%. The chip manufacturing company boosted its outlook for the second quarter of 2019, expecting an additional $13 million to $21 million in revenue to about $194 million and a stronger gross profit margin of 21%. In addition, MagnaChip reported on its strategic evaluation of its foundry business and one of its manufacturing facilities, saying that its look at those businesses is ongoing. Investors were pleased to see the company doing better than it had expected, and they hope that MagnaChip will eventually find a favorable way to make the most of the businesses that it's looking to put to better use.