The surge in U.S. crude oil production over the past five years has been truly phenomenal. Not only has it greatly reduced the nation's dependence on foreign sources of oil and improved its trade deficit, but it has also brought about much greater stability to the global oil markets.

In fact, according to Ryan Lance, CEO of ConocoPhillips (COP 1.23%), the world's largest independent exploration and production company by production and proved reserves, the rapid growth in U.S. crude oil supplies has been the main reason we haven't seen wild swings in the price of oil lately.

Speaking to reporters after ConocoPhillips' annual shareholder meeting in Houston this month, Lance said that the increase of about 1 million barrels per day from U.S. shale production has helped keep global oil markets in check, offsetting geopolitical risks in Russia and reduced output from major oil-producing nations such as Libya, Syria, and Iran that would have otherwise caused a spike in prices.

Lance isn't the only one endorsing this view. The International Energy Agency also credits the U.S. shale boom for having practically removed the threat of a global oil supply shortage, providing much-needed balance to the global oil market. And PIMCO's Greg Sharenow and Mihir Worah have even said that the U.S. shale boom could have "the most significant impact on oil prices of any supply event in recent decades."

How to invest in the U.S. shale boom
With U.S. oil production expected to continue growing at a rapid clip over at least the next few years, how might investors capitalize on the nation's bounty of shale oil? There are numerous options depending on one's appetite for risk and growth versus income. For income-seeking investors, energy master limited partnerships, or MLPs, which own and operate the infrastructure necessary to accommodate growing oil and gas production, are a good option.

MLPs enjoy a tax-advantaged structure that requires them to pass on the lion's share of their profits to their shareholders (known as unitholders in MLP parlance), which allows them to have a 6% yield on average. Many also enjoy highly stable "toll-road" business models that virtually eliminate commodity price exposure and provide a great deal of cash flow stability.

Another option for those seeking stronger growth is to invest in the companies that explore for and produce oil and gas -- the so-called "upstream" sector. While these companies tend to be the riskiest in the business, some have delivered outsized gains to investors in recent years.

For instance, shares of Kodiak Oil & Gas (NYSE: KOG), a junior oil and gas producer focused almost exclusively on North Dakota's Bakken shale, have surged more than 1,000% over the past five years, as compared to just over 100% for the S&P 500, as the company has delivered compound annual production growth of nearly 150% since 2010.

2 stocks to consider
One MLP worth considering is Magellan Midstream Partners (MMP), which is mainly involved in the transportation, storage, and distribution of crude oil and refined petroleum products such as gasoline and diesel fuel. The partnership is investing heavily in oil infrastructure to capitalize on the ongoing shift away from natural gas and toward oil by upstream companies.

The company is currently pursuing $1.1 billion in expansion projects, including the Longhorn pipeline and the BridgeTex pipeline that will expand its capacity in the Permian Basin, a fast-growing, liquids-rich resource play in West Texas, by about 350,000 barrels per day. These projects will generate strong and stable cash flows since they are supported by long-term, fee-based contracts that should drive 20% distribution growth this year and 15% in 2015, on top on the company's 3.1% distribution yield.

Photo credit: Flickr/Paul Lowry.

One upstream company I believe has significant upside potential is Apache (APA 0.56%), which has sold off billions of dollars' worth of non-core assets over the past year to focus on its more profitable and less risky onshore U.S. assets. The company has used asset sale proceeds to significantly reduce its debt and buy back 24.3 million common shares as part of its 40 million share buyback program.

Despite Apache's strong prospects for North American liquids production growth, which will significantly boost its margins and cash flow in the years ahead, the company commands an EV/EBITDA multiple of less than 4 and barely trades above its book value -- a discount that appears both unwarranted and unsustainable and suggests the stock could have significant upside.