What happened

Embraer (ERJ -0.74%) shareholders have had a very rough time in the past two years. Indeed, Embraer stock lost more than half of its value between Aug. 2014 and Aug. 2016 as the company suffered from defense spending cuts in Brazil and a weak market for business jets.

However, shares of the world's third-largest aircraft manufacturer got back on track in October, climbing 23.9%, according to data from S&P Global Market Intelligence.

ERJ Chart

Embraer stock performance. Data source: YCharts.

So what

Three major pieces of news powered Embraer's stock gains last month. First, the company reported in mid-October that it had delivered 29 commercial jets during Q3, up from just 21 a year earlier. Additionally, while executive jet deliveries fell, the mix improved. Embraer delivered 12 large executive jets last quarter, compared to nine in Q3 2015.

Second, Embraer resolved a long-running corruption probe by U.S. and Brazilian officials. The company admitted that it had paid bribes in several countries in order to win various contracts. It will pay a total of $205.5 million to avoid prosecution for the violations and has implemented better compliance procedures. Settling this case removes a big cloud that has been hanging over Embraer for years.

Third, on the last day of October, Embraer reported better-than-expected Q3 earnings. Revenue jumped 17.9% due to the uptick in commercial airplane deliveries and gross margin improved by 1.3 percentage points. Embraer also revealed that its ongoing cost-cutting program will take out $200 million of costs on an annualized basis by the end of 2016.

Now what

Embraer stock has been unfairly punished in the past year or two, but most of its problems seem to be temporary.

Development of Embraer's E2-series jets is running ahead of schedule. Image source: Embraer.

Embraer has done an admirable job of bringing in enough orders for its first-generation E-Jet to bridge the gap until production of its next-generation commercial jets ramps up in 2018 and beyond. The KC-390 military tanker/cargo plane is also on track to begin deliveries in 2018. That will stimulate growth on the defense side of Embraer's business.

The struggling executive jet division could take longer to recover. But Embraer has now taken appropriate measures to reduce costs and is focused on maximizing profitability, even if it means selling fewer planes. All in all, the company seems well positioned for a rebound in earnings over the next few years. That could get Embraer stock moving in the right direction, too.