A national measure of housing affordability has improved for the first time in more than three years, according to a new report. However, the coast-to-coast relief masks "crisis" price pressure in the country's two most scrutinized housing markets.

RBC Economics' measure of housing affordability for all of Canada slipped 0.7 per cent to 51.9 per cent in the fourth quarter of 2018. The gauge is based on the proportion of median pre-tax household income needed to service the cost of ownership.

RBC attributed the relief for would-be homeowners to weaker property values in the wake of the Office of the Superintendent of Financial Institutions' B-20 guideline, which applies a stress test to uninsured mortgages, and other regulatory changes that have cooled markets.

Despite the headline improvement, RBC warned in its report that homeownership is still out of reach in certain cities.

"The fourth-quarter relief barely made a dent in Vancouver and Toronto," according to RBC economists Craig Wright and Robert Hogue. "Affordability is still at crisis levels in these markets and pressure is intensifying in Montreal."

RBC's fourth-quarter measure of housing affordability stood at 84.7 per cent in Vancouver, 66.1 per cent in Toronto, and 44.5 per cent in Montreal.