What happened

Markets are nudging higher today with the S&P 500 and Dow Jones Industrial Average rising 0.7% and 0.6%, respectively. But investors are especially charged up about solar specialist Enphase Energy (ENPH 7.67%) after learning of an analyst's optimistic outlook on the stock.

As of 11:24 a.m. ET, shares of Enphase Energy are up 5.4%, retreating from their earlier rise of 7.2%.

So what

Espousing a decidedly more bullish outlook on shares of Enphase, Sean Milligan, an analyst at Janney Montgomery Scott, upgraded the stock to buy and assigned a $282 price target, implying upside of about 42% from Friday's closing price. On Feb. 3, Milligan had rated the stock neutral and set a price target of $238.

From the time of the commentary several weeks ago through Friday's trading session, shares of Enphase had fallen about 12%, but that hasn't deterred Milligan from recognizing that the stock has room to run. According to The Fly, Milligan's more bullish stance on the stock is predicated on the fact that "public installers have spoken positively about market trends, confirming similar comments Enphase made on their Q4 earnings call."

Now what

While Milligan's outlook is shining brightly in investors' eyes, it's important to remember that analysts' price targets often are based on shorter time horizons than the multiyear holding periods long-term investors prefer.

A leader in residential solar solutions, Enphase recently reported a strong fourth quarter of 2022 -- another in a string of impressive performances. It's things like this as well as the trend for increasing solar power adoption that should factor more strongly in investors' minds.