San Francisco’s median home prices have surged for the last six years, rising 106% between 2011 and 2017. That’s pushed up prices across the board, including in the luxury market.

And while the city also enjoys a booming jobs environment, it’s against the backdrop of a volatile stock market, so a question naturally begs to be answered: Is the Golden City’s housing market at risk of blowing up?

Not quite, industry experts say.

"We actually refer to this as an elevated risk of bubble activity but nowhere near close to what true bubble behavior would look like," said Javier Vivas, director of economic research for Realtor.com.

A dramatic change in local market conditions, however, could exacerbate that "elevated risk" level, he cautioned.

More: Bay Area Luxury Sales Double Despite Market Uncertainties

Soaring for six years

Median sales prices in the city have soared since 2012 and topped out at the end of 2017 with single-family homes selling for an average $1.5 million in the fourth quarter of 2017. Condominiums and lofts ended the year at an average $1.195 million; they’ve since ticked down, according to data provided by Patrick Carlisle, chief market analyst for Paragon Real Estate Group.

At the top of the market, luxury home values (single-family houses and condos selling for $2 million or more) appeared to peak in 2016 at an average of $1,230 per square foot countywide and $1,592 per square foot in the city’s priciest district, the historic North Beach waterfront, according to Paragon.

Luxury condo prices in particular stagnated between Q4 of 2016 and Q4 of 2017, posting 0% growth year-over-year compared to 10% growth in the overall market, according to Realtor data provided by Mr. Vivas.

One condition to watch, Mr. Vivas said, is San Francisco’s inventory problem. New housing construction was essentially flat between 2016 and 2017, he said, while the number of new households created annually, has grown, according to new Realtor data.

A more likely red flag for the San Francisco market in the near future, according to Mr. Vivas, would be an increase in home-flipping, which is apparently making a comeback in some regions of the U.S., including booming metros like Denver, Seattle and Atlanta. The practice of buying, renovating and re-selling a home to make a quick profit, popular with investors, is considered to have been a major contributor to the housing bubble and subsequent market crash 10 years ago. President Donald Trump favors loosening regulations on consumer lending that were enacted as a result of the recession— a move that could excite the house-flipping industry.

More: 130-Year-Old House in San Francisco is One of the City’s Most Expensive

Tech sector’s impact on housing

Of course, the rapidly growing tech sector creates both promise and the potential for peril in the wider Bay Area housing market, experts indicated.

"We're in the midst of this giant high-tech boom and there's been an almost unbelievably huge creation of new wealth in the Bay Area," said Mr. Carlisle, chief market analyst for Paragon Real Estate Group. "More developers than ever have decided to target the luxury and ultra-luxury condo market."

Mr. Carlisle, a 30-year veteran of the industry in the Bay Area, noted several new condominium towers that have been slowly but steadily rising in the posh neighborhood south of Market Street, including the lavish new 70-story building at 181 Fremont.

The expectation is that many tech companies have yet to—but will indeed—make an initial public offering, and therefore continue to mint millionaires overnight who will absorb the housing supply. But the luxury market has softened in the last 18 months as affordability has become an issue, experts said, which creates some tension.

"One has to ask, is there really enough inherent demand for condos that cost, $3 million, $5 million, $10 million, and of course up to $40 million?" Mr. Carlisle said.

Another trend to watch is outward migration, as rising prices in the overall market gradually drive residents beyond city borders in search of affordability.

More: Click to Find out the Tax Implications of Buying a Condo Versus a House in San Francisco

San Francisco County, together with the nearby Oakland and Hayward hubs, ranked No. 2 (after San Jose) in Realtor’s recent study of markets with the lowest "inbound to outbound home-buying interest," Mr. Vivas said. The study was based on internet views of listings on Realtor.com. A low inbound-to-outbound ratio means a market is less affordable and has less inventory available but has higher expected job growth than the markets from that it receives inbound views, according to Realtor.

San Francisco residents are looking for housing in Alameda, Contra Costa and San Mateo, as well as further away, in Sacramento, Los Angeles and Phoenix, the Realtor study states.

"This is possibly people saying, ‘Look, I’ve had a job now for two years, and the rent situation is not affordable,’ so they start to think about buying, but they can’t," Mr. Vivas said. Then, "they start to look outward, and they’re commuting further, or working virtually, or altogether cashing out and going somewhere else."

At the same time, rising U.S. interest rates, Trump’s plan to impose tariffs on imported steel, and the ramifications of the new tax law all have potential to throw a wrench in the San Francisco real estate market, said Nina Geneson Otis, broker and owner of Metropolitan Properties.

At the moment, Ms. Geneson Otis said she is waiting to see how those factors, especially the tariffs on imported steel, play out against the strong local job market.

"If the cost of these materials keeps going up, then construction costs are going to keep going up," she said. "We’re used to having a lot of our materials be pretty (competitively priced), because it can all be imported," such as solar panel parts from China and Korea.

More: Iconic San Francisco Gay Bar Now $6 Million Home

Warning signals to keep an eye on

Mr. Carlisle noted that housing crashes in San Francisco have historically been triggered not by local crises but by national or international ones, such as the stock market crash of 2008, the sell-off after 9/11, or the global panic that led to the "Black Monday" crash of 1987.

"We have a lot of issues going on in the Bay Area that I think are warning signals about our local economy … but none of them that I see triggering some sudden dramatic crash," Mr. Carlisle said.

Lisa Blackwell, a broker at Compass who sells high-end condos as well as luxury East Bay houses, suggested that rising interest rates could spur San Franciscans who are thinking about selling their homes to do so sooner than later.

"It should have some micro-effect," Ms. Blackwell said of the higher rates, but not a huge impact because many luxury homebuyers make cash purchases.

In general, however, she feels little anxiety about the risk of a housing bubble.

"I don’t see any housing bubble coming, in part because we have enough people and we have the salaries to pay for what people are getting," she said. "And there are always way more buyers than there are sellers."

More: Click to read more San Francisco real estate news