Shares of Redfin (RDFN 8.49%) popped by as much as 29.5% this week, according to data from S&P Global Market Intelligence. The online real estate brokerage and mortgage originator surged in reaction to news that inflation was continuing to ease as well as recent data suggesting that activity in the housing market is rising. Interest rates on mortgages have also fallen from their recent highs.

As of the close on Friday, shares of Redfin were up 27% for the  week, but were still down 93% from their all-time high.

More mortgage applications, lower inflation, dropping interest rates

Redfin earns revenue when people transact on homes and originate mortgages through its online platform. Over the last couple of years, it has faced major headwinds as the Federal Reserve rapidly raised benchmark interest rates to fight inflation. Homebuying activity across the country slowed as mortgage rates climbed from around 3% to over 7%. Affordability has been at its lowest levels for homebuyers in recent history, and perhaps ever, as interest payments on mortgages went up by more than 50%. That stalled Redfin's revenue growth and led to deteriorating profits -- the company booked an operating loss of around $300 million over the last 12 months.

News this week may indicate these macroeconomic headwinds may be easing. Month-over-month inflation came in at 0% for October, which indicated to investors that the Federal Reserve might start cutting interest rates within the next few quarters. The central bank has already kept the benchmark federal funds rate steady for two consecutive Federal Open Market Committee meetings now, alleviating a bit of the pressure on home affordability. Mortgage rates have fallen a bit from their recent highs, but remain above 7%.

All of this has led to a slight recovery in housing activity. Redfin reported this week that mortgage-purchase applications rose for the second straight week. However, pending home sales were still off 8% year over year for the last four weeks, showing that there's a long road ahead to a housing market recovery. Redfin also reported new listings for homes on the market rose 3% year over year. All of these data points are positive indicators for Redfin's business.

What truly matters: profits

Macroeconomic activity may move this stock in the short term, but over the long term, only one thing matters for Redfin: profits. It has dug itself quite a hole with the trajectory of its operating income. With gross profits of just $287 million over the past 12 months, the company either needs to reduce its operating expenses significantly or greatly grow its sales (or both) in order to get into the black.

With a market cap of just $780 million, the stock might work if Redfin can eventually turn a profit. But it has a long road ahead.