What happened

Shares of the real estate brokerage Redfin Corp (RDFN 0.99%) traded nearly 16% higher as of 3:06 p.m. ET today for no obvious reason. The stock could be moving higher after reporting earnings late last week and on a more optimistic macro outlook.

So what

The company reported a net loss of $0.73 per common share for the second quarter of the year, much wider than the $0.29 loss the company reported in Q2 2021. However, total revenue of nearly $607 million grew 29% on a year-over-year basis. Both numbers still missed analyst estimates for the quarter.

"The housing market took a turn for the worse in the second quarter," Redfin's CEO Glenn Kelman said in an earnings statement. He added: 

But I have never been more proud of how this company has responded: we cut costs, grew traffic, accelerated share gains and loyalty sales, lowered voluntary attrition and, for the first time since April 2020, improved the rate at which people buying homes stuck with a Redfin agent.

In the third quarter, Redfin expects revenue to come in between $590 million and $627 million, and to generate a net loss between $87 million and $79 million.

On a better note, Redfin recently reported that more homebuyers are returning to the market thanks to a decline in mortgage rates and price drops on listings.

Now what

Real estate and mortgage stocks have been hit hard this year due to surging mortgage rates that have made refinancing activity non-existent, but investors seem to be starting to believe that inflation may have peaked. If there are signs of this, the hawkish Fed may soon start to slow the pace of its aggressive rate hikes, which could lead to mortgage rates dropping further and activity picking up. 

Still, it's hard to bet on the Fed's moves or predict where rates will be in a year. Redfin's business does seem to be improving, but I'm staying on the sidelines for now.