What happened

Shares of RH (RH 1.99%), the high-end home furnishings company formerly known as Restoration Hardware, were surging last month after the stock rebounded from a sell-off following a guidance cut in late June. A bullish analyst note from Citigroup also seemed to give the stock a boost, as did the broader market's rebound.

Since RH is a discrectionary retailer, the stock is highly sensitive to the macroeconomic environment.

According to data from S&P Global Market Intelligence, shares finished July up 32%. As you can see from the chart below, the stock jumped in the beginning of the month as it recovered its losses from the guidance cut and surged at the end of July on a broader upswing in the market.

RH Chart

RH data by YCharts.

So what

RH stock fell 10.5% on June 30 as investors balked at the company's guidance cut, with management now calling for a revenue decline of 2%-5% in the current fiscal year. CEO Gary Friedman also warned of a "deteriorating macroeconomic environment."

However, others saw the stock as being oversold. Shares jumped sharply in the first week of July, up 23.5% through July 8, which included a 10.4% bounce on July 5.

Citi analyst Steven Zaccone gave the stock a strong endorsement on July 1, saying that it offers "significantly more upside than downside." He also said the stock traded at just nine times his lowered 2023 earnings estimates, which he considers to be a bearish forecast. Given that valuation, the stock seems to have a lot of upside potential. Zaccone maintained a buy rating with a price target of $338 on the stock.

RH stock traded sideways for much of the rest of the July on little news, but the stock rose again in the last week of the month along with the broader market rally. Investors responded favorably to generally strong earnings reports from big tech companies, as well as comments from Fed Chair Jerome Powell, who downplayed concerns about a recession, citing a strong job report. Falling oil prices in July were also a bullish sign, and could mean that inflation peaked in June.

Now what

While RH will remain sensitive to macroeconomic conditions, Zaccone makes a good point that the stock looks undervalued even after July's gains. Despite the expected decline in revenue this year, RH still expects to deliver operating margin of 21%-22%, a sign of its competitive advantage. 

At a forward P/E of 11.9, the stock still has a lot of upside, especially if inflation cools faster than expected.