NEW YORK (TheStreet) -- Shares of SolarCity  (SCTY) were up in pre-market trading on Thursday after investment bank Lazard (LAZ) undervalued the San Mateo, CA-based solar energy company by $400 million in its analysis of the company's proposed sale to Tesla Motors (TSLA).

But the purchase price of $2.6 billion was nonetheless within the valuation range determined by Lazard even after factoring in the accounting error, Reuters reports.

Lazard's analysis incorrectly determined an equity value between $14.74 and $34 per share because it counted some of the company's anticipated indebtedness twice, according to an SEC filing cited by Reuters.

The investment bank later realized that the valuation range was between $18.75 and $37.75 per share. 

The two companies noted that the miscalculation won't affect their view of the deal, according to the filing. The purchase price will be $25.37 per share, to be paid with Tesla stock.

Separately, TheStreet Ratings team rates the stock as a "sell" with a ratings score of D.

SolarCity's weaknesses include its deteriorating net income, generally high debt management risk, disappointing return on equity, weak operating cash flow and generally disappointing historical performance in the stock itself.

You can view the full analysis from the report here: SCTY

TheStreet Ratings objectively rated this stock according to its "risk-adjusted" total return prospect over a 12-month investment horizon. Not based on the news in any given day, the rating may differ from Jim Cramer's view or that of this article's author.