Image source: Marathon Oil.

Merrill Lynch recently upgraded shares of Marathon Oil (MRO -1.26%) to buy and gave the stock a price target that would represent a 40% gain from its mid-August level. For any investor, a 40% price increase is substantial and worth noting. So let's take the time to dig into Marathon a bit and see if it is not only a good bet for higher prices into 2017, but also set up for long-term growth potential.

Production increases

Marathon Oil's net production of oil and natural gas available for sale in the second quarter tallied 384,000 barrels of oil equivalent per day (BOE/D). This continues a long-running decline in sales volumes. In the first quarter, for example, it registered 388,000 BOE/D. If we stretch the time horizon a little more, the decrease is even more prominent. Back in 2014, the company reported total production sold 459,000 BOE/D, sop we're talking about a 15% decline in just two years time. .

This steep decline in production, driven by over $1 billion in non-core divestitures and the oil price crash, has wreaked havoc on Marathon's earnings. In 2014, the company brought in over $3 billion in earnings. Through the first half of 2016, Marathon has reported a net loss of $577 million.

Although Marathon has not been able to turn a profit during the price crash -- certainly not uncommon among upstream producers -- the company is fortunately moving forward with plans to boost its production levels. Marathon purchased 61,000 acres in the Oklahoma STACK resource basin in the second quarter and plans to add a new rig this quarter. Additionally, Marathon plans to spend capital in order to expand drilling in its positions in the North Dakota Bakken and Texas Eagle Ford regions. It also reduced exploration and production costs in its North American positions by 28% from last year. Combined, the company hopes to boost production into 2017 while keeping costs low.

Contingent on oil prices

Unfortunately, Marathon's success over the next few years will be closely tied to the price of oil, meaning investors have to make an educated guess on oil prices. Merrill Lynch estimated that oil will be nearly $70 per barrel by the end of 2017, which is a very tricky estimate and should be taken with a grain of salt. For Marathon, though, a company that depends on oil production for a majority of its profits, the price of oil over the next few years is critical.

You need not look further than the correlation between Marathon's past profits and oil prices. In 2014, when average oil prices were above $90, Marathon brought in $3 billion in net income. In 2015, when oil prices dropped to under $50, Marathon's profits swung $5 billion the opposite direction. In 2016, as prices remain low, Marathon continues to report losses.  Fortunately, it has used the environment to continue to cut costs, trimming North American production costs from $179 million to $129 million year over year.  Additionally, it believes that at $50 oil, its new STACK positions will become profitable in roughly a year and half from initial production.   

While you shouldn't put too much stock in oil prices estimates through 2017, it is a safer assessment to assume that prices will rise in the long term. Since Marathon's fortunes are inextricably linked to the price of oil, that means if Marathon can set itself up for increased production while keeping costs low, its long-term profits should rebound. Fortunately, that is exactly what the company is doing and will continue to do for the remainder of 2016.

Investor takeaway

Merrill Lynch's assessment of a short-term Marathon price surge is enticing, but is difficult to quantify. Long-term, the company has made several moves this year to capitalize when oil prices do in fact rebound. As investors, that means buying in right now might mean some price swings as Marathon Oil works through its strategy and waits for the long-anticipated oil price increase.