Inflation is measured by the Consumer Price Index (CPI), which factors in a basket of goods and services to determine how much prices are changing over time. 

In June 2022, the CPI hit a 40-year high of 9.1% on an annualized basis, which prompted the U.S. Federal Reserve to embark on the most aggressive campaign to hike interest rates in its history. That was an unpleasant combination for the stock market, because it was certain to slow consumer spending, leading investors to reduce their growth expectations for most companies.

But fast forward to today, and the economic picture looks far more promising. The Bureau of Labor Statistics just released its CPI data for May 2023, and the annualized number came in at just 4.0%, which means the rise in inflation has officially been cut in half since last year's high.

A chart of the monthly Consumer Price Index (CPI) data from February 2022 to May 2023.

As the above chart shows, declining inflation is now a rock-solid trend. As a result, Investors have been buying stocks for most of this year, sending the benchmark S&P 500 index surging 15%. There is now an expectation among many market strategists that the Federal Reserve will soon stop raising interest rates and may even cut rates toward the end of this year.

There are two stocks that would especially benefit from an environment where inflation and interest rates are coming down. Here's why investors should consider buying them now.

1. Zillow Group

Housing is one of the asset classes most sensitive to changes in inflation and interest rates. A home is often a consumer's largest investment, and when rates go up, they can't afford to borrow as much money, which brings down the value of the real estate market. Real estate technology company Zillow Group (Z 1.68%) (ZG 1.70%) has felt the effects of this slowdown in its services segments, but if things turn around, this could prove to be a great time to buy its stock.

In late 2021, Zillow abandoned its largest source of revenue: direct buying. Previously, it would purchase homes directly from willing sellers with the intention of flipping them for a quick profit. But when the housing market stopped climbing, it faced significant losses on its inventory of properties. Since then, the company has focused on becoming a digital one-stop-shop for real estate transactions, providing technology services to agents, plus mortgages, closing services, and more. 

In the first quarter of 2023, 212 million unique users visited Zillow's online channels each month for their real estate needs, logging 2.5 billion total visits for the period. But if you're looking for a new home, Zillow is about to take your search to the next level. The company recently integrated OpenAI's ChatGPT into its platform, which allows users to describe their ideal property to the chatbot, which will then retrieve all the listings that match the criteria. Spending hours scrolling through pages and pages of listings might soon be a thing of the past.

Since Zillow's new business strategy (without direct buying) is focused on services, it's a capital-light model with high gross profit margins. In Q1, Zillow's revenue fell 89% compared to the prior-year period (attributable to the absence of direct buying). But its preferred profitability metric -- adjusted EBITDA -- fell just 53%. This suggests Zillow could become meaningfully more profitable than before despite generating just a fraction of the revenue. 

Zillow stock remains 77% below its all-time high amid the broader stock market sell-off and its own internal restructuring. Its price to sales (P/S) ratio of 5.8 is well below its peak of 19, which reflects investors' recent pessimism, but if interest rates do come down later this year as some analysts expect, stocks like Zillow will likely come back into favor.

2. Sea Limited

Few companies are as reliant on consumer spending as Sea Limited (SE 0.05%). Its core businesses span e-commerce, online gaming, and digital payments, all of which have been impacted by rising inflation and interest rates globally. The company has also been slashing costs to prioritize profitability, and the combination of these factors has stalled its revenue growth recently. But over the long-term, this new strategy might prove to be extremely rewarding.

Shopee is Sea Limited's flagship e-commerce platform, and it's the most popular in areas like Southeast Asia. In the first quarter, the segment generated $2.1 billion in revenue, up 36% year over year. While that was a slowdown from the 64% growth rate it generated at the same time in 2022, it was still robust given this environment.

On the flipside, the company's digital entertainment (gaming) segment has been a drag. Its revenue plunged 43% in Q1, and it also shed active users and paying users. Some of last year's figures were still elevated because of the pandemic and work-from-home trends, but now that society is returning to normal, Sea Limited is struggling to maintain momentum in the gaming business as people are simply getting less screen time.

Nonetheless, Sea Limited still managed a total revenue gain of 4.9% in the quarter, taking the figure to $3.0 billion. While that growth rate seems sluggish -- and it is -- here's the good news: The company delivered a profit of $87 million, which was a dramatic improvement over its $580 million net loss a year ago. That followed a surprise $422 million profit in the fourth quarter of 2022, and it's proof Sea Limited's strategy to trim costs like marketing and staffing are bearing fruit on the bottom line.

If inflation continues to decline and interest rates follow, that could reignite the company's revenue growth organically. And since it's now a much leaner business, much of that increase in revenue could flow straight to the bottom line as profit. Since Sea Limited stock is down a whopping 82% from its all-time high, this might be a great time for investors to build a position ahead of more favorable conditions for the company.