Shares of Pinterest (PINS 4.04%) have been rising in value this year and they now trade around their 52-week high. Analysts from Wells Fargo have becoming bullish on the social media stock as well, recently setting a price target of $34.

Should investors expect that the tech company can continue building off its recent gains, or has the stock hit a peak?

Why the stock could go higher

Pinterest generates revenue through ads, and so how it performs depends on how well it's attracting users to its site, and how much advertisers want to spend.

In its last earnings report, for the period ending March 31, Pinterest reported that its global monthly active users (MAUs) rose by 7% to 463 million. That's one of the strongest growth rates the company achieved in recent quarters.

Rising MAUs make the company more valuable to advertisers, who could be willing to spend more if the economy were in better shape.

Chart showing Pinterest's monthly active users.

Source: Pinterest's Q1 investor presentation.

Fears of a recession on the horizon led to companies cutting back on spending (including advertising), and that made growth a challenge for many tech companies. But inflation is slowing and the U.S. economy rose by 2% during the first quarter, which was a significant revision from the 1.3% previously estimated.

So the country might be in good shape, and there's a possibility that a recession might not occur.

Another catalyst for Pinterest is that in April, the company announced that it would be allowing third-party ads on its platform, with Amazon being its first partner. This will make it easy for people to find something they like on Pinterest and potentially lead to a sale on Amazon.

Pinterest CEO Bill Ready said in a press release: "This aligns with our goal of making every Pin shoppable, so that we can enable as many users as possible to bring their dreams to life."

There are multiple catalysts here that could lead to some good growth for Pinterest in future quarters, and could set up the stock for even stronger gains as the year goes on.

Why the stock may have peaked

Pinterest has been doing well this year, but the problem could be that it's simply too expensive right now. It's trading at 6.5 times revenue, which is similar to the premium investors are paying for Meta Platforms stock, which has a much larger and more diverse social media business, with billions of monthly users. 

And while Pinterest stock recently did obtain an upgrade from Wall Street, on average, analysts don't see that much upside for the shares. The consensus analyst price target is just over $28, which suggests that Pinterest is already right around its peak.

The stock could certainly receive more upgrades from analysts, but its financials would likely first need to improve; the company's sales growth has been unimpressive in recent quarters: 

PINS Revenue (Quarterly YoY Growth) Chart

PINS revenue (quarterly YoY growth) data by YCharts. YoY = year over year.

Pinterest also isn't a consistently profitable business, either. Over the trailing 12 months, it has incurred an operating loss totaling $102 million. In three of the past four quarters, its net income has been in the red.

Without a stronger bottom line and better growth numbers, it could be difficult for the stock to continue rising in value.

Is Pinterest stock a buy?

There's certainly the potential for Pinterest's stock to continue rising since there are some levers -- such as its deal with Amazon and a stronger-than-expected economy -- which could accelerate its growth and lead to more bullishness.

Ultimately, it may all lead back to the outlook for the economy. If it's strong and advertisers are spending lots of money, Pinterest should be in a good situation. And with more revenue flowing through, its bottom line should also be stronger. 

Pinterest can continue rising, but the risk for investors is that if economic conditions worsen and a recession does end up taking place over the next 12 months, the stock could quickly give back some of those gains.

I'm not convinced the economy won't still struggle, and for that reason I'd be cautious on Pinterest and other businesses that are reliant on a strong ad market for success. But if you're OK with the uncertainty, it could be a good stock to buy for the long haul.