FNC
Leigh Gallagher
For more consumer tips, tune in to "The Cost of Freedom" business block, Saturday starting at 10 a.m. ET.

When violence erupted in the Middle East last week and caused the markets to drop sharply for a few days, investors suddenly found themselves wondering what kind of toll the strife will take on the market and just what actions, if any, they should take.

Here's the answer: don't overreact. The markets were and still are worried about the prospect of the violence spiraling into a wider war that could send global markets into a tailspin, but in recent days, those fears seem to have subsided, with the markets edging up for part of the week. But far and away, the bigger fears and more powerful drivers affecting stocks right now are closer to home: inflationary fears and the mood of the Federal Reserve.

Truth be told, the stock market has historically weathered crises in the Middle East remarkably well. After the Six Day War in 1967, stocks were up after a week, and showed similar resilience after the two U.S. invasions of Iraq. When the markets have declined, there have typically been other factors at hand, like the recession in 1991 around the time of the Gulf War, or after 9/11, which directly attacked the U.S. financial markets with a massive and unprecedented terrorism strike on U.S. soil. But conflict in the Middle East has almost never had a long-term negative impact on the stock market.

There is, however, one bigger cause for concern this time around: oil. Should it escalate, a crisis in the Middle East could disrupt the global supply and could ultimately draw in Iran, the region's second-largest oil producer and a country already on tense terms with the U.S. The threat of oil disruption has always been part of past conflicts in the region, but it looms as a far greater threat this time around for one reason: demand is at an all-time high, and a disruption now would have far greater consequences than it would have had ten, and even five, years ago.

Still, smart investors saw the declines as opportunity, buying up shares earlier this week on faith that the conflict would be short-lived and sending markets edging up on the optimism.

Of course, that doesn't mean the threat of higher oil prices is going away. Going forward, investors have plenty of reasons to be cautious: rising interest rates, a slowing economy, rising inflation, and slowing corporate profits. This is all more than enough to keep investors wringing their hands in the coming weeks or, alternatively, rallying on any positive signs, like Ben Bernanke's comments Wednesday that the economy seems to be moderating and inflation remains contained. That's good news for now, and as the conflict seems to be subsiding or at least remaining contained, stability may return to the markets before we know it. But in the skittish climate that's prevailed all spring and summer, as far as the U.S. stock market is concerned, these factors alone are likely to spook investors as much or more as the threat of a full-fledged war.

Leigh Gallagher is a senior writer for SmartMoney magazine and a regular contributor to "Cavuto on Business."