In the past few weeks, the price of a barrel of oil has risen to its highest level in the last several years, and I believe it is poised to move higher. Lately, I’ve been asked quite a bit about what this means for the stock market. While high oil prices may have an effect on certain sectors and industries, I believe the far greater impact would be indirect — and could happen in several different ways.

Why have oil prices risen?

There are always a number of different forces at work that affect oil prices, but I will focus on just a few that have had a significant impact recently. First, the United States recently refused to recertify the nuclear accord with Iran, which means Iran is now prohibited from selling oil to US entities. In addition, the US is attempting to force European Union entities from buying oil from Iran as well. This could mean that Iran will not be able to sell its oil to much of the global market, thereby shrinking global supply and increasing prices.

Second, the current crisis in Venezuela has worsened, reducing oil production even further. According to the Organization of Petroleum Exporting Countries (OPEC), Venezuela’s oil production in March 2018 was at a 30-year low of approximately 1.4 million barrels per day; this oil production has been declining for more than a year as the country falls deeper into a chaotic mixture of corruption, deteriorating infrastructure, runaway inflation and an inability to service its debt. In my view, further deterioration for Venezuela seems likely given its re-election of President Nicolas Maduro on May 20. This could be very problematic given that Venezuela holds more of the world’s oil reserves than any other country.

What does this mean for stocks?

And so a question I have been asked a lot lately is: What does this mean for the stock market? I believe the best way to answer such questions is to look at history. Over the past few decades, the relationship between the price of oil and the global stock market has varied over time, having changed multiple times. There have been periods of positive correlation, negative correlation and relatively no correlation in the last three decades.1 My takeaway from history is that there is no strong relationship on a broad basis.

And that means investors should not assume that higher oil prices will be bad for stocks in general. For example, in 2010 oil prices rose substantially, about 15% — from approximately $78 per barrel for West Texas Intermediate crude oil in January 2010 to $89 in December 2010. However, the performance of the MSCI All Country World Index for calendar year 2010 was 12.67%. That makes sense given that there are so many factors impacting the price of stocks in general — including monetary policy, which can be very powerful.

Instead, the strong relationships have been between the price of oil and certain stock market sectors and industries — specifically, energy and transports. In addition, stocks in countries that import oil tend to be hurt by higher oil prices, while stocks in countries that are export oil tend to rise on higher oil prices. I also expect that, if oil prices rise high enough, it could have a significant impact on low- and middle-income consumers, thereby impacting a portion of the consumer discretionary sector.

Related: Webcast: Behind the Machines: Investing in Robotics from a Research Perspective

However, my view is that higher oil prices may have a far greater indirect impact on the stock market — and the economy — and that this would likely happen in several different ways. One way is by forcing the US Federal Reserve (Fed) to get more aggressive in its rate hike cycle. It’s widely known that the Fed focuses on core inflation — which excludes food and energy prices — rather than headline inflation in determining the pace of tightening, so many assume that higher oil prices won’t have an impact on the type of inflation that the Fed cares about.

However, higher oil prices can and do pass through into core inflation, as was noted in a 2017 Fed commentary. The authors concluded that “oil price fluctuations have a limited but long lasting effect on core inflation.” Therefore, as higher oil prices seep into core inflation — exacerbated by other inflationary forces such as wage growth and tariffs on items such as aluminum and steel — they have the potential to cause the Fed to get more aggressive in its rate hikes.

This would be expected to create some headwinds for the economy, which in turn could exert downward pressure on the stock market and dampen stock prices. Admittedly, this would likely occur with a significant lag and, given that its effect is usually limited, I believe it should not be a significant concern in the near term — but it is not something we should entirely ignore.

Then there is the impact that rising oil prices may have on the 10-year US Treasury yield. In the past year, there has been a positive correlation between oil prices and the 10-year Treasury yield. This makes sense given that the yield on the 10-year Treasury is widely viewed as a gauge of expectations on global growth and inflation. With rising oil prices placing upward pressure on inflation, I expect the 10-year US Treasury yield would continue to move higher, so long as global growth remains solid.

Related: 7 Reasons Why Robotics Should be Taught in Schools

This in turn may cause a re-rating of stocks as the 10-year yield pushes through key levels and pressures valuations. As the International Monetary Fund (IMF) warned back in January, “Rich asset valuations and very compressed term premiums raise the possibility of a financial market correction, which could dampen growth and confidence.” We have seen this occur several times in the past few months, with the 10-year yield hitting new key levels, which have in turn prompted short-term stock market sell-offs.

Key takeaway

And so, in the shorter term, I would not be surprised to see oil prices rise, pushing the US 10-year Treasury yield higher and causing another re-rating of stocks. However, I believe an increase in US oil production will partially counter the void created by the loss of supply from Iran and Venezuela — albeit with a lag. And I believe stock market fundamentals remain solid, helping to support stocks following knee jerk re-rating sell-offs as the 10-year yield rises. So investors should expect higher volatility for equities in this environment.

Perhaps most importantly, rising oil prices are an important reminder that inflation protection may need to be a serious consideration for investment portfolios — especially given that there are a variety of inflationary pressures at work. There are several asset classes that may help mitigate the downside effects of inflation, including: commodities.

If the prices of goods and services are rising, then the price of commodities may also be rising at a similar level, real estate, for the same reason as commodities. dividend-paying stocks, these may offer a hedge against inflation if companies increase their dividend payouts at a pace that meets or exceeds the pace of rising prices. Inflation-protected securities. In general, the outstanding principal of these bonds is tied to inflation — this means the principal goes up when inflation goes up, and therefore the interest paid on that principal rises as well.

Some of the best known are TIPS (Treasury Inflation Protected Securities, issued by the US government) and LINKERS (issued by the UK government).

This article has been republished with permission from Invesco Powershares.