The Canadian stock market is in rare company this year as one of the very few major indexes to sit out what has been a near-universal uptrend.

From the United States to Europe to emerging markets, stock markets almost everywhere have advanced considerably in the year to date as the global economy has found more solid footing.

There's no economic disconnect to blame – the latest Canadian data are suggesting close to a full recovery from the oil shock.

Story continues below advertisement

And yet, the S&P/TSX composite index is a curious bit of red in a sea of green, down since the start of the year by 0.6 per cent.

It's unusual for Canadian stocks to simultaneously diverge from both the domestic economy, and the equity trends playing out in closely aligned peer countries, said Vincent Delisle, a portfolio strategist at Scotia Capital.

Unusual, if not exactly a mystery. "Everywhere you look, Canada has its own little specific sideshow," Mr. Delisle said. "Housing-related headlines, U.S. trade fears, and weak oil prices have soured investor sentiment."

Some of those headwinds could subside in the second half of the year, he said. But that hardly makes for a glowing outlook for Canadian equities, especially with oil falling below $45 (U.S.) per barrel this week for the first time this year, and with investors getting spooked in recent days over U.S. tech stocks.

A rocky week saw the main Canadian index dragged down to a six-month low, which is good for the worst year-to-date performance in the developed world – almost. Only Israel's 3.2-per-cent decline ranks worse among 24 developed market indexes, according to Bloomberg data.

Canada dominated those rankings just last year, ringing in a total return of 22 per cent in 2016 as commodity prices stabilized.

Canada's streak continued into this year, at least economically. First-quarter real GDP grew at an annualized pace of 3.7 per cent, making it the fastest growing of the G7 countries. The Canadian economy added 370,000 over the past 12 months. And a stellar earnings season just wrapped up, with S&P/TSX composite index corporate profits rising by nearly 30 per cent over past year.

Story continues below advertisement

Story continues below advertisement

The global economic backdrop, meanwhile, has certainly been supportive of equity prices in general. The S&P 500 index is up by 8.7 per cent this year so far. The Stoxx Europe 600 index has advanced by 7.5 per cent. And emerging markets are having their best first half since the rebound from the global financial crisis – the MSCI EM index has risen by 16.4 per cent this year.

For Canadian equities to underperform by such a wide margin in that kind of environment typically requires some sort of Canada-specific shock, CIBC economist Nick Exarhos said.

"We have had that, I would argue. The Home Capital issue has, at least for international investors, given them a reason to be less enthusiastic on Canadian risk assets."

The troubles facing Home Capital Group Inc., the country's largest alternative mortgage lender, amplified international concerns about a potential bubble in Canadian residential real estate.

"That's dampening the appetite for Canadian risk assets," Mr. Exarhos said. Recent balance of payments results show an accelerated net outflow of foreign direct investment (FDI) out of Canada.

In addition to housing concerns, the state of Canada's relationship with the United States since the election of Donald Trump has weighed on sentiment. "One big concern in the wake of the U.S. election and the attendant trade rhetoric was that companies that had a choice would tend to invest in U.S. operations rather than Canadian operations," Bank of Montreal chief economist Doug Porter wrote in a recent note. "While far from conclusive evidence, these latest [FDI] figures are a warning shot in that direction."

Story continues below advertisement

The crude oil market then ratcheted up the pressure on Canadian stocks, as the global oversupply flared up, dragging prices down by 13 per cent in less than one month.

Additionally, long-term bond yields have been declining for most of the year, which is the wrong direction, at least for bank profits.

"It's been a confluence of factors this year," Scotia's Mr. Delisle said. "Everything that could go wrong, is."

On the bright side, the disconnect between Canadian and U.S. stocks has opened up a valuation gap making domestic stocks relatively more attractive.

S&P/TSX composite index stocks now trade at an average of nearly two full multiple points below S&P 500 stocks, which is close to the largest discount of the last 15 years, Mr. Delisle said.

"Under a scenario of continued global growth … we believe there is a 'catch-up' trade for Canada."