What happened

Shares of electric-car maker Tesla (TSLA -1.11%) were trading sharply higher on Friday. Specifically, the stock rose as much as 6.7% Monday morning and was up 5% as of 10:50 a.m. ET.

The stock's gain was likely driven by a combination of an upbeat day in the overall stock market, as well as an analyst's bullish comments on the stock on Friday.

So what

Year to date, Tesla stock has declined about 29%. This decline, which is worse than the S&P 500's 13.5% pullback during the same period, has created an attractive buying opportunity for investors, according to Credit Suisse analyst Dan Levy.

Levy's bullishness comes after he visited Tesla's factory in Fremont, California. Though he acknowledged that near-term pressure on Tesla's deliveries due to challenges at its factory in Shanghai is likely, he was upbeat about continued manufacturing momentum at its factory in California. Overall, Levy remains bullish on the company's long-term opportunity.

Tesla vehicle interior.

Tesla Model Y interior. Image source: Tesla.

The analyst has an outperform rating on the stock and a price target of $1,125. This 12-month price target impressively translates to about 50% upside from where shares are trading today.

Now what

Investors, of course, shouldn't rely on analyst price targets to choose stocks. They should do their own due diligence and consider whether the stock's current valuation is attractive relative to the underlying business's momentum and the company's long-term growth potential.

But to Levy's credit, Tesla's underlying business seems to be performing exceptionally well this year. Despite global supply challenges in the automotive industry and a pause in production at Tesla's factory in China during Q1, the company managed to grow production 61% year over year and deliveries 68%. Further, Tesla continues to expect to grow deliveries 50% or more this year.