The S&P 500 is up 16% this year, and the market is now in bull market territory, at least by some definitions. But some stocks may have climbed to valuations that are simply too high to sustain, at least in the short term.

Two stocks that Cathie Wood holds in the Ark Innovation fund that analysts think could have limited upside at this point are Palantir Technologies (PLTR 1.29%) and Roku (ROKU 0.57%). With that said, here's a closer look at what investors might expect from each of these stocks moving forward.

1. Palantir Technologies

Data analytics company Palantir has been surging in value this year. Up around 140%, the stock has been a big benefactor of the emergence of artificial intelligence (AI) as Palantir has launched an AI-based platform to capitalize on new growth opportunities. 

But with the stock now trading at over $15, it's at a far higher value than its consensus analyst price target of $9.54. Based on analyst price targets, the stock has a downside risk close to 40%. Analysts have been boosting their price targets for the stock in recent months, but those upgrades haven't kept up with the stock's impressive gains. 

At a price-to-sales multiple of 16 and 69 times its estimated future earnings, there's no doubt that Palantir is an expensive stock to own right now. In the short term, which is what analyst price targets cover, there does appear to be some risk of a drop in price as it definitely appears as though hype has taken over of late.

In the long run, investing in the tech company may still be a good move, as demand for its products and services has been skyrocketing due to the emergence of AI. And with the company now profitable and expecting its operations to remain in the black moving forward, Palantir could attract more investors as it could be seen as a safer buy, especially if it can build off the 24% revenue growth it achieved last year when sales totaled $1.9 billion.

Palantir's stock may have hit a near-term peak, but as long as you're willing to be patient with it and hold on for multiple years, it could still make for a good investment.

2. Roku

Roku is an entertainment company that makes it easy for consumers to turn regular TVs into smart ones with one of its dongles. It also sells smart TVs that come with its built-in operating system, where people can add applications for many different streaming services. A slowing ad market due to fears surrounding a possible recession, however, slowed down its revenue growth, and last year the stock plunged 82%.

This year, however, it has recouped some of those losses as the stock has jumped more than 55% amid a more optimistic outlook for the economy. At $70.81, the consensus analyst price target is a bit higher than where the stock trades right now but that's only due to a recent drop in value for Roku. And analysts have been trimming their price targets, as a year ago the consensus price target was just under $200.

If the economy doesn't show improvement and it does end up slipping into a recession, more downgrades for Roku could be coming. While the company has expanded into smart home devices and is now making its own TVs rather than relying on third-party manufacturers, hardware sales come at lower gross profit margins for Roku, which means that even if its sales growth rate rises, it might not result in a significant improvement for its bottom line. In the trailing 12 months, Roku has incurred an operating loss of $531 million.

The stock trades at less than three times its revenue, and it isn't a terribly expensive investment to own, but there is some uncertainty as to how the business will perform as it pivots more toward hardware. Devices account for about 14% of the company's overall net revenue (platform-related revenue is the bulk of its top line), but that could change in the future.

Roku is a stock that could perform better, but it, too, will likely require patience from investors. Until the ad market fully recovers and the economy is in much better shape with recession fears entirely gone, it wouldn't surprise me if the stock were to struggle and give back some of the gains it has accumulated this year. At the very least, I'd wait to see how the company performs in the next few quarters before buying the stock, given that its sales mix may change.