TORONTO -- North American markets recovered from their early morning losses Monday to close in positive territory in spite of falling crude oil prices.

The energy-heavy S&P/TSX composite index eked out a gain of 79 points to close at 20,180.60, even as the West Texas Intermediate crude oil price was down close to three-and-a-half per cent on the day.

The S&P/TSX capped energy index ended down 1.56 per cent, and the capped materials index was down 1.17 per cent as Canadian mining companies also took a hit from slumping commodities prices. Health care stocks were up 4.88 per cent and the capped consumer discretionary index rose 1.08 per cent.

In New York, the Dow Jones industrial average closed up 151.39 points at 33,912.44. The S&P 500 index was up 16.99 points at 4,297.14, while the Nasdaq composite closed up 80.86 points to 13,128.05.

Markets rallied throughout the day after first falling in early morning trading on new economic data out of China that showed factory output and retail sales in that country weakened in July. China's central bank also cut a key interest rate, acknowledging more needed to be done to shore up the world's second-largest economy.

Since China is a major global importer of oil, the news immediately caused the price of oil and other commodities to fall. But Craig Fehr -- an investment strategist with Edward Jones -- said he believes equities markets still have some momentum behind them thanks to the rally that has been taking shape in recent weeks.

"The enthusiasm behind the global economy is waning a bit today, but I wouldn't say there's a huge amount of conviction behind the market movements in either direction today," Fehr said. "I think the markets are still in wait-and-see mode ahead of some important consumer data later this week."

Fehr said investors will be watching closely for Tuesday's release of the Consumer Price Index in Canada, which will show how much inflation in this country increased for the month of July.

If the Canadian number tracks closely to the already-released U.S. figure and shows that the pace of inflation in this country has also started to slow, that will be seen as good news by the market, Fehr said. Investors are eager for any sign that the Bank of Canada may relax its efforts to curb inflation and tap the brakes on interest rate hikes going forward.

Also important this week will be new U.S. retail sales data, Fehr said, as well as quarterly earnings reports from major U.S. retailers like Walmart, Lowe's and Home Depot.

"I think the market will look at those as a bellwether for how consumers are behaving in this environment," he said.

While market sentiment has improved dramatically since June, Fehr said investors are still cautious. Part of the reason for that is the North American economy appears to be a in a "dual state of strength and weakness" right now, with a hot labour market and low unemployment on one side and still-elevated inflation on the other.

"There are still plenty of headwinds out there," Fehr said. "I would say sentiment and the data are less bad than they were earlier this year, but I think it's too early to declare victory on either the recession front or the inflation front."

The Canadian dollar traded for 77.47 cents US compared with 78.23 cents US on Friday.

The September crude contract was down US$2.68 at US$89.41 per barrel and the September natural gas contract was down four cents at US$8.73 per mmBTU (million British Thermal Unit).

The December gold contract was down US$17.40 at US$1,798.10 an ounce and the September copper contract was down five cents at US$3.62 a pound.

This report by The Canadian Press was first published Aug. 15, 2022.