What happened

HubSpot (HUBS 2.96%) shares climbed 10.8% last month, according to data provided by S&P Global Market Intelligence, thanks to well-received product updates and positive momentum across the tech sector. The marketing software company published a fantastic quarterly earnings report in February, setting the stage for gains when market conditions improved in March.

So what

HubSpot had serious momentum heading into March. The stock rose 34% in the first two months of the year, helped along by better-than-expected earnings results. When tech stocks jumped higher to close out the quarter, HubSpot was in prime position to reap those rewards.

Marketing team in a modern office looking at a CRM software dashboard on a computer monitor.

Image source: Getty Images.

Investors got excited when the company announced a new artificial intelligence (AI) tool called ChatSpot. This will combine HubSpot's AI with ChatGPT, and it's intended to improve ease of use and productivity for HubSpot users. The company also expects ChatSpot to aid in data analytics on the platform, unlocking more value for subscribers. That news came on the heels of a similar announcement from industry peer Salesforce.com, so timing was important. AI is the hottest topic in tech investing right now, so collaborations with ChatGPT are likely to generate hype.

None of the news about HubSpot was enough to explain an 11% gain on its own. Instead, the past few months' announcements allowed the stock to capitalize on sectorwide momentum. The Vanguard Information Technology ETF rose 9.4%, and its chart looked very similar to HubSpot's.

HUBS Chart

HUBS data by YCharts

Tech stocks were clearly responding to external economic factors, and the rally followed the Federal Reserve's latest announcement amid turmoil in the banking industry. While the central bank announced another rate hike, its commentary on economic conditions opened the door to more accommodative policy later this year. As banks continue to struggle and the labor market cools, rate hikes are more likely to halt, and interest rates could even drop. Growth stocks tend to benefit from lower rates, so there was some optimism for tech stocks in March.

Now what

HubSpot's rally this year has been fueled almost entirely by rising valuation ratios. Its forward P/E ratio rose from around 60 to nearly 95, while its P/S ratio inflated in similar proportion above 11. Whether or not this is justified, it clearly shows that the stock is more expensive relative to business fundamentals.

HUBS PE Ratio (Forward) Chart

HUBS PE Ratio (Forward) data by YCharts

A forward P/E ratio above 90 is fairly high for a company that's forecasting 20% growth next year. That creates some volatility risk for shareholders, because HubSpot will have to deliver excellent results to justify its price.

Nonetheless, the company does have excellent growth drivers over the medium term. It's also shown major upside potential in better market conditions. Despite its fantastic rally so far this year, HubSpot shares are still down more than 50% from their 2021 high around $840. In a more accommodative interest rate environment, the stock could generate returns if it continues to achieve impressive quarterly results. With a potential recession looming, this is only suitable for long-term holders.