What: Shares of McDermott International (NYSE:MDR) ended the month of August up 12.6% after it looked like shares would end up down as much as 25% last month as the price of oil had given oil services stocks a beating. The company was able to wipe out all of that bearish sentiment when it announced a major contract with Saudi Aramco, the national oil company of Saudi Arabia.

So what: August was looking to be a rough month for the entire stock market, but oil services companies like McDermott were getting hit especially hard when you combined the following factors: weakening Chinese demand for oil, persistent declines in oil prices, and the continued cuts by oil and gas producers to their capital expenditure budget. What made so much of this decline that much more for McDermott shareholders is that the company posted better-than-expected earnings results in August and even upped its guidance for operating profit from $25 million-$50 million to $50 million-$70 million for the year. Much of this change in prospects was due to the company's ability to cut costs over the past several months.

MDR Chart

MDR data by YCharts.

All of that seemed like a non-event, however, when compared to when the company announced that it had signed its multiyear lump sum contract with Saudi Aramco. Even though the engineering, procurement, construction, and installation contract does not have a dollar amount fixed to it, the company has said it is one of its largest and that it will encompass work across several of Saudi Arabia's offshore fields. The news of this contract shot the stock up 30% in a single day. That was more than enough to make up for the all the losses in the beginning of the month.

Now what: A big question remaining is the size of this contract with Saudi Aramco. Clearly, the announcement and subsequent surge in share price suggests that it will have a material impact on the company's balance sheet for the next three years as McDermott works through the contract. However, Wall Street is well known for overreacting to news like this.

What is probably most promising is that McDermott was able to cut costs enough to remain profitable with its existing operations. If it maintains these levels of lower-cost operations, then bringing on this new contract could be the cherry on top of what may be a company worth keeping an eye on over the next couple quarters as we get more information about the Saudi Aramco contract. 

Tyler Crowe has no position in any stocks mentioned. You can follow him at Fool.com or on Twitter @TylerCroweFool.

The Motley Fool has no position in any of the stocks mentioned. Try any of our Foolish newsletter services free for 30 days. We Fools may not all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors. The Motley Fool has a disclosure policy.