The stock market closed on Friday narrowly mixed, with major market benchmarks barely budging in either direction as investors tried to navigate through conflicting news items.

On one hand, rising geopolitical risk globally became much more apparent after the U.S. military launched a barrage of missiles at a Syrian air base overnight in response to chemical weapons attacks on Syrian civilians earlier in the week. One the other, some view the event as one that could finally push the Trump administration out of its malaise, and give it more political muscle to advance its domestic economic agenda.

Despite a lack of conviction in the market at large, some stocks posted sharp gains on Friday, and Diana Shipping (DSX -0.53%), Akorn (AKRX), and Granite Construction (GVA -1.41%) were among the best performers on the day. Below, we'll look more closely at these stocks to tell you why they did so well.

Diana gets an upgrade

Diana Shipping climbed about 12% after getting positive comments from analysts at JPMorgan. The financial giant boosted its rating on the shipping stock from neutral to overweight, citing more favorable conditions in the dry bulk shipping industry that could bring it greater stability and better growth prospects. Diana and its peers have been quite volatile recently, with many investors hoping for a bounce even as global economic conditions have remained somewhat uncertain. But if JPMorgan is right, then a greater level of confidence in the shipping industry could lead to further gains not just for Diana Shipping, but for the entire cohort of shipping stocks.

Diana Shipping vessel.

Image source: Diana Shipping.

Akorn climbs on takeover speculation

Akorn jumped 18% in the wake of reports that the generic drugmaker might become a takeover target. Speculation swirled that it might get a bid from German health care giant Fresenius (FMS 0.44%), which has recently sought to expand its global network through acquisitions. Already, Fresenius has made some strategic acquisitions within Europe, but a bid for Akorn would signal a more ambitious effort to expand across the Atlantic. Some of Akorn's operations would fit well with existing Fresenius business units, but at least for now, even the reports suggesting the merger as a possibility were cautious. It's entirely possible that nothing will ever come from the talks, other than a brief pop in the stock.

Granite gets a win

Finally, Granite Construction rose 8.7%. The construction company got a couple of pieces of good news today, with an upgrade from analysts at Goldman Sachs from neutral to buy setting a positive tone for the stock. Meanwhile, the more important news fundamentally was that an infrastructure spending bill in California passed its legislature, opening the door to more than $50 billion in spending over the next decade. Granite is in a position to take advantage of that money, especially given that the company already gets almost a tenth of its revenue from the California Department of Transportation. With prospects for further gains if the federal government passes an nationwide infrastructure initiative, investors are excited about Granite's prospects.