What a difference a year makes in Canada’s housing market.

Let’s say you purchased a typical Toronto home in March 2016. It would have cost you, on average, $688,011 -- an unimaginably high amount to many people just a few years earlier. If you decided to sell that home one year later in March 2017, it would have fetched around $916,567 -- an incredible $228,556 more.

But let’s say you had hung onto it for another five months, until after the Ontario government slapped a tax on foreign buyers and expanded rent control. It would have been back down to $732,292.

That roller-coaster ride was all too familiar to people in Vancouver. Prices there shot up 31 per cent from $708,500 in August 2015 to $933,100 one year later, in August 2016, before cooling back down to $896,000 in January 2017, four months after British Columbia implemented a foreign buyers’ tax.

The direction of prices in Vancouver has since reversed again. A new record average of $1,046,900 was set in November.

Things haven’t been nearly as volatile in many other parts of the country but the typical home prices nationwide did rise 13 per cent between the third quarter of 2016 and the third quarter of 2017, from $555,000 to $628,000.

Thankfully for those hoping to jump into the market, 2018 could be the year the market finally calms down. Experts say that while some factors will continue to push prices upward, other factors are likely to push them back down, meaning that, overall, prices shouldn’t rise nearly as quickly.

Royal LePage expects a 4.9-per-cent increase next year to $661,919 for the typical home in the 53 cities it tracks. RBC, meanwhile, predicts just a 2.2-per-cent increase in the national average, to $501,400.

Here are five of the factors expected to keep the market more balanced in 2018.

1. OSFI’s Stress Test rules

The government regulator known as the Office of the Superintendent of Financial Institutions will require all homebuyers taking out mortgages from the lenders that it regulates to meet a “stress test” as of Jan. 1. That means buyers going to a Big Five bank for a mortgage will need to prove they can afford the Bank of Canada prime rate, even if their lender plans to give them a lower rate. For example, if the prime rate is 4.99 per cent, a buyer would need to show he or she can afford a 4.99 per cent interest rate even if they have such excellent credit that they’re offered a mortgage at 2.99 per cent interest.

That two percentage point difference might not sound like much, but it would translate to hundreds of dollars per month on a typical mortgage, thereby reducing the amount for a house many people can afford.

Phil Soper, President of Royal LePage, says that the new rule will take some transactions out of the market because many of the people who were planning to “move up” to a pricier house will no longer qualify for bigger mortgages.

That could push prices down somewhat, and first-time homebuyers could benefit because they usually don’t have a 20 per cent down payment, which means that they have long been subject to the same stress test when taking out mandatory mortgage insurance.

That said, Soper thinks the stress test may also have a subtler effect on the market than some believe. He points out that banks have already been putting people under their own internal stress tests for years, even if they don’t advertise it. What’s more, people renewing mortgages with the same lenders won’t be tested, Soper says. He also points out that the rule only applies to OSFI-regulated lenders, but not to what he calls “grey market” lenders.

TD Economics estimates that the new rule will cut demand for homes by five to 10 per cent, shaving two to four per cent off prices.

Toronto-based broker John Pasalis points out that many people who might have been affected will have rushed to buy houses before the Jan. 1. deadline, so the true impact is “anyone’s guess.”

2. Interest Rates

The amount of interest that lenders charge homebuyers reflects the cost of borrowing from the Bank of Canada, so when the Bank of Canada raises rates (usually when the economy is growing), lenders pass that cost on to consumers with higher mortgage rates. The higher the rate, the lower the number of people who can afford homes. When fewer people are buying, prices fall.

With the economy growing at a healthy pace, Royal Bank economists say that they expect the Bank of Canada to hike its overnight rate by another 100 basis points to two per cent by the end of 2018.

TD Bank, meanwhile, says that the impact of rising rates “will be felt disproportionately within a few key markets where affordability is the most challenged: Vancouver, Toronto and Montreal.”

Soper agrees. Overall, he thinks the impact of rising rates on prices will be modest. “Mortgage rates will still be lower than they were 10 years ago and five years ago,” he points out.

3. 'Peak millennials'

The children of the baby boomers, known as millennials, make up one of the biggest demographics in history, and they’re reaching home-buying age in record numbers.

Statistics Canada reports that there will be a projected 2,559,200 people between the ages of 25 and 30 in 2018 -- up 150,000 from five years earlier.

“The pent-up demand for housing from millennials is enormous,” Soper says. “It’s just such a large cohort of people that are moving into the prime first-home space.”

Royal LePage hired a company to survey 1,000 millennials in June and they found that only 35 per cent of them already owned a home. Of those who didn’t yet own, 69 per cent said they wanted to buy within the next five years.

That means that even if some people are pushed out of the market by things like the OSFI stress test and rising interest rates, there could be many other first-time buyers looking to take their place, pushing prices up.

4. Immigration growth

Another factor that can push prices up is immigration.

Canada added between 236,800 and 281,000 immigrants annually between 2004 and 2014. The Liberals boosted the number to 296,000 in 2016, an expected 300,000 in 2017, and are targeting 310,000 in 2018.

Soper says immigration will continue to increase demand, pushing prices up, particularly in the big cities where new immigrants are most likely to settle.

5. International policy decisions

Sometimes policy decisions in other countries can affect the market here.

The last time there was a major nationwide drop in home prices in Canada was between the fourth quarter of 2007 to the first quarter of 2009, when prices fell 11 per cent, according to CMHC.

Pasalis, the president of Realosophy Realty, says that “a lot of that was consumer confidence” related to the foreclosure crisis in the United States, where policymakers had allowed all kinds of risky lending that was never actually a problem in Canada.

“People were freaked out about the housing markets around the world,” Pasalis says. “If consumers start becoming less confidence, they hit pause on a lot of things.”

An example of a policy decision that could impact Canada in 2018 is New Zealand’s plan to ban non-resident foreigners from buying resale homes. While it’s a small country, that decision could push wealthy global investors to take a closer look at Canada, driving up prices here. “These are certainly concerns,” Pasalis says.

Taken together, Pasalis and Soper, along with RBC and TD, all forecast that prices will continue to rise in most parts of the country, but at a more modest pace.