Nissan Motor shares climbed the most in more than two months after the Japanese carmaker raised its earnings outlook, avoiding what could have been its first annual operating loss in five years.

The stock rose as much as 6.5% in early morning trading in Tokyo, the most since Feb. 17 on an intraday basis, after the company estimated it posted a full-year operating profit of ?50 billion ($314 million) compared with its previous forecast for a ?60 billion loss.

Nissan cited the removal of U.S. emissions-related charges, a favorable foreign-exchange impact and improved cost performance.

It¡¯s a rare bright spot for a carmaker that¡¯s been struggling to reshape itself after failing to keep up with the industry¡¯s shift to electric vehicles and hybrids in Japan, China and the U.S.?

Even so, the revision mainly reflects noncore factors rather than a rebound in underlying demand. Nissan¡¯s management expects further gains from cost discipline, better cash flow in the second half and incremental benefits from a refreshed product lineup.

"Earnings are solid, thanks in part to stronger-than-expected progress in restructuring,¡± Kazunori Maki, an analyst at SMBC Nikko Securities, wrote in a note.

Manufacturers selling cars in the U.S. had set aside funds to pay federal fines, including greenhouse gas compliance penalties, and will now no longer need to do so after the Trump administration shifted policies. That¡¯s translating into a short-term boost for foreign automakers in the market. Apart from Nissan, Toyota Motor and Honda Motor stand to benefit, although to different degrees given their variance in scale and profitability.

Final results are scheduled to be released May 13.