As we head into 2017, oil markets seem to be in a state of flux the likes of which hasn't been seen for more than two years. The U.S. shale boom is slowing, crude prices are slowly rising, and OPEC has finally put together what appears to be a credible plan to cut production and reduce excess global oil inventories. 

Against that backdrop, you might find it surprising to learn where the U.S. sits among oil markets today, and what it could mean for the future of black gold. 

Image source: Getty Images.

Until recently, the U.S. was the world's top oil producer

It might not seem like it, but the U.S. has been the biggest producer of oil in the world since April 2014, according to the International Energy Agency. But it lost the title in August, when Saudi Arabia produced 12.58 million barrels per day to the U.S.'s 12.2 million. 

What's incredible right now is the pace of change in U.S. production. Between May and August of 2016, the U.S. shut down 460,000 barrels per day of oil production that had been added during the shale boom of the past decade. Saudi Arabia, by contrast, added 400,000 barrels per day of production over the same time frame. 

You can see the nearly decade-long rise and subsequent fall of U.S. production in the revenue of Continental Resources Inc. (CLR) and Whiting Petroleum Corp (WLL), two of the biggest shale drillers during the boom years. 

CLR Revenue (TTM) Chart

CLR Revenue (TTM) data by YCharts.

The U.S. is still one of the biggest oil producers in the world, though the Middle East gets most of the publicity when the topic of controlling the price of oil comes up. But the U.S. is more market-based than many OPEC nations, and it needs high oil prices to support it if it's going to enjoy the title of biggest producer in the world. And right now, those prices aren't conducive to U.S. dominance of oil markets. 

Excess inventory is relatively small 

High inventory has been blamed for depressed oil prices over the last two and a half years. But there might not be as much inventory lying around as you think. According to the Energy Information Administration, the U.S. had commercial oil stocks of 487.5 million barrels in November 2016, which is only enough to supply the country's consumption for 25 days. Add in 24 days of gasoline inventory and 40 days of distillate inventory (diesel and fuel oil) and there's only about two months of commercial inventory in the U.S. at any time. 

Image source: U.S. Energy Information Administration.

The reason inventories are small is simple: It's relatively expensive to store oil for long periods of time, and there are only so many oil tanks for the purpose. What's interesting here is that it wouldn't take a lot of disruption to oil production to cause prices to skyrocket with only 25 days of commercial supply in waiting. A war in the Middle East, a U.S. trade war with China, or an major oil supplier experiencing a serious disruption could impact crude values in a big way. 

Sometimes it's easy to forget that the last five years have been relatively stable in oil markets. No major wars have broken out that disrupted supply, and those foreign conflicts that did occur have been relatively minimal in their effects. But it wasn't long ago that Libya and Iraq had significant supply disruptions; if something similar happened again, consumption could chip away at inventory levels very quickly. The relatively small commercial oil stocks are worth keeping in mind as foreign relations seem to get more tenuous. 

U.S. oil imports have fallen by nearly two-thirds in 10 years

Imports of oil to the U.S. have long been a problem for the country's trade deficit, energy security, and job creation. But over the last decade, oil imports have fallen by nearly two-thirds. 

Data source: U.S. Energy Information Administration. Chart by author. 

A reduction in oil consumption explains some of the decline in imports, but the biggest driver has been the rise in U.S. production (as is reflected in Continental Resources' and Whiting Petroleum's revenue growth). Shale and offshore oil production have both jumped in the last decade, leaving far less need for oil imports. According to the latest data from the EIA, net oil imports have fallen from 60.3% of consumption in 2005 to 24.1% in 2015. 

What's notable is that the dynamic that drove falling imports is changing. As I mentioned above, domestic production of oil is now falling. And after falling between 2005 and 2012, consumption of oil is on the rise again. A stronger economy and low oil prices have led consumers to buy more SUVs and generally consume more energy. It may take another spike in oil prices to drive consumption down once again. 

Prices drive U.S. oil markets

You can see that all of the factors I discussed above are driven by oil prices. When oil prices are high, consumers use less and U.S. oil drillers rapidly expand their production. When prices are low, consumers increase usage and U.S. oil production falls. The dynamic is worth thinking about when you're considering whether rising oil prices are going to be a headwind or tailwind to your portfolio going forward.