Open this photo in gallery:

Plumes of smoke rise over oil depot tanks hit by joint Israel-U.S. strikes north west of Tehran, Iran, on Sunday.Hossein Esmaeili/The Globe and Mail

At first, investors didn’t seem to be very concerned about the sudden outbreak of a major war in the Middle East. The TSX actually rose on Monday, March 2, the first day of trading after the bombings started. New York’s major indexes were down, but the losses weren’t significant.

It was only on Tuesday that the gravity of the hostilities seemed to hit traders. The choking of the Strait of Hormuz. Attacks on Saudi Arabia, Kuwait, Qatar, Bahrain and the UAE. Lebanon dragged into the fray by weakened but still dangerous Hezbollah.

It continued to escalate from there. A British base in Cyprus came under drone attack. Azerbaijan became involved when Iranian drones crossed its border. Russia has been reported to be supplying Iran with military intelligence.

Predictably, oil prices have shot up, threatening to reignite inflation. Hopes for interest-rate relief in the U.S. look dim as a result. International trade, already under pressure because of the Trump tariffs, has been dealt another blow.

With no end to the conflict in sight, world markets sagged. Even gold, normally a safe haven in times of trouble, took a hit.

Opinion: In the Iran war, good news is bad news for oil, Canada and our future

The stock-market damage hasn’t been too serious yet. The TSX is down by 4.2 per cent from the previous record high, despite last week’s sell-off. The S&P 500 is off 3.4 per cent from its high. That’s a long way from correction territory (a decline of 10+ per cent from the previous high).

It’s what comes next that matters. We’re a week into this conflict, and there appears to be only two likely outcomes. The most desirable is a quick and decisive end to hostilities, leaving a bruised but still viable Iran ruled by a stable government.

In that scenario, markets should snap back quickly, oil and gas prices should revert to their pre-March levels, and the world would return to focusing on Trump’s next tariff moves.

The worst-case scenario would see the war drag on for months as a desperate Iran, ruled by a hard-line council, continues to lash out at any perceived enemy and manages to enforce the closing of the Strait of Hormuz.

In this situation, oil and gas prices would continue to rise. Qatar’s energy minister has suggested oil could reach US$150 a barrel. Inflation fears would skyrocket. A frustrated Donald Trump might be tempted to put boots on the ground in support of minority groups like the Kurds in an effort to install a more compliant regime in Tehran. That could lead to a repeat of the disastrous Iraq conflict.

Trump administration defends waiver on Russian oil sanctions

The result could be a slow-motion but escalating market collapse as the economic impact of the conflict becomes increasingly widespread.

So, what should you do in these circumstances? Here are some ideas.

Take part profits. I don’t like selling in times of adversity. In fact, most financial experts suggest the opposite course: buy when prices are weak. But we’ve enjoyed strong stock markets in recent years, and you may hold securities that have more than doubled in value, even after last week’s pullback. Taking some of that money off the table and holding it in reserve in case the situation further deteriorates isn’t a bad idea.

But check out the tax consequences before acting. And don’t overdo it. If there’s a quick ending to the war, shares of quality companies will bounce back, perhaps surprisingly quickly. So, I’m not suggesting selling everything and moving to cash. Rather, do some selective pruning.

Check out commodities. Wars are bad news for stocks and bonds. But they can lift commodity prices, as we’ve seen with oil and gas. There may be a spill-over impact on commodities that are not directly affected by the war but may see rising prices because of higher shipping costs for fuel and insurance.

Seven Canadian oil producers set to benefit from rising prices

Look for special situations. No matter what’s happening, there are always some investments that are making money. Currently it’s energy and defence stocks. The iShares US Aerospace & Defence ETF is up almost 12 per cent so far this year. Mr. Trump has asked industry leaders to ramp up output – which means more profits for them.

Hold your gold. There are two ways of looking at the precious-metals sector right now. One is the safe-haven thesis. What better time to have gold bars safe in a Toronto bank vault than when the Middle East is in severe conflict? The counter to that is inflation, which almost certainly would push up interest rates. That increases the opportunity cost of owning gold. If you have big profits in gold, you might consider taking some, but my expectation is that the safe-haven approach will prevail.

Keep U.S. dollars. The U.S. dollar is holding up well so far. Part of your cash holdings should be in greenbacks. Short-term Treasury bonds are a good choice. I suggest the iShares 0-5 Year TIPS Bond Index ETF (XSTP-T) which is denominated in U.S. dollars. It’s up 0.84 per cent year to date.

There’s no way of knowing how long this war will last. Investors must be flexible and understand that it could get worse before it gets better.

But it will get better so keep your cool and take advantage of situations as they arise.

Gordon Pape is editor and publisher of the Internet Wealth Builder and Income Investor newsletters.

Be smart with your money. Get the latest investing insights delivered right to your inbox three times a week, with the Globe Investor newsletter. Sign up today.