The stock market has gotten off to a bumpy start this year, but you'd never know that from the performance of the two biggest commercial real-estate firms.

Shares of CBRE Group Inc. are up 4.3% since Jan. 1 and Jones Lang LaSalle Inc.'s stock is up 18.3%. The shares of both companies are trading near their 52-week highs, and Jones Lang LaSalle is close to setting a record.

On the other hand, the S&P 500 index is down about 0.7% for the year.

So what gives? Commercial real-estate firms are enjoying higher profits as the economic recovery boosts sales, leasing and development and investors believe that will continue as the recovery gains steam. Last year, CBRE's shares were up 32.2% and Jones Lang increased 22.7%, compared with a 29.6% rise in the S&P.

In late January, for example, Jones Lang LaSalle's stock saw its strongest surge of the year after the company beat analyst projections by reporting earnings per share of $6.32 for 2013, up from $5.48 in the previous year.

"It's like getting a report card at the end of the school year,"  Colin Dyer, Jones Lang's chief executive, said in an interview Thursday.

If the stocks and earnings keep rising, this could be an active year for mergers, acquisitions and expansions in the commercial real-estate industry.

Unlike some companies, both big brokerage firms are reluctant to use shares to finance acquisitions even when they're trading at such a high level. Their shareholders wouldn't want to be diluted.

But the increased profits empowers them to expand offices, hire staff and make strategic acquisitions of smaller firms. It gives CBRE cash flow "to leverage into the business," said Steven Iaco, CBRE's senior managing director of investor relations.

CBRE spent $545 million on acquisitions in 2013 and already has announced two acquisitions this year: a technical real estate consulting firm in Germany and parts of the Furman Co., a former brokerage affiliate in Greenville, S.C. 

Jones Lang LaSalle is making acquisitions, hiring staff and opening two offices a year in China, a growing market, Mr. Dyer said.

The high stock valuations also are likely to restart one of the favorite parlor games in the brokerage business: guessing whether Exor SpA will move to sell commercial real estate giant Cushman & Wakefield Inc. Over the years, Cushman & Wakefield has squashed rumors about this possibility by consistently saying that it isn't for sale.

But real-estate industry executives believe the Italian investment company eventually will want to cash out its controlling stake in Cushman & Wakefield. What better time to do it than when the stock market is putting a premium on real estate services companies?

To be sure, the stock market could turn on brokerage companies if the economy sours. Los Angeles-based CBRE's shares dipped below $2.50 per share in 2009, compared with their closing price of $27.44 on Friday—2 cents below their 52-week high. Chicago-based Jones Lang LaSalle fell well below $20 during the downturn. On Friday its shares closed at $121.14, just $1.86 short of its all-time high.

But for now the companies are benefiting as investors buy more buildings and landlords and corporations increase outsourcing the management of their real estate.

"They both are really just sitting on a sweet spot," said Mitch Germain, an analyst who covers the companies for JMP Securities.

In the U.S., sales of commercial real estate totaled $355 billion in 2013, up nearly 20% from the year before, according to Real Capital Analytics, a research firm.

In New York, the country's largest commercial real-estate market, leasing volume has been strong, boosting brokerage commissions. About 36.5 million square feet of office space was leased during the year, compared with 34.2 million square feet in 2012, according to CBRE.

—Dawn Wotapka