A Tesla Model 3 car is on display during the Auto China 2018 at China International Exhibition Center on April 25, 2018 in Beijing, China.

One of the most shorted stocks in the United States, Tesla shares cost investors betting against the company more than $1 billion in losses on Wednesday alone after the stock rallied 9.7 percent. Adding to the short woes, the stock is up 13.5 percent in June and up 21 percent since April.

The stock rose 1.7 percent Friday and is now up 10 percent on the week.

A bullish call from a Wall Street analyst capped off a rough week for Tesla short sellers, with Nomura Instinet advising clients that the electric car maker's shares could rally 42 percent over the next year.

More than 30 percent of Tesla's floating stock is currently sold short, according to FactSet.

"We believe Model 3 average selling prices are coming in above forecast due to stronger-than-expected demand for all-wheel-drive and performance configurations," analyst Romit Shah told clients. "We also anticipate cost leverage as Tesla scales to higher levels of production."

Shah said early generations of Tesla's "first production" long-range battery costs typically fell in the $50,000 range, or nearly breakeven for the Palo Alto, California-based automaker. However, as the company scales to higher levels of production and ramps its efficiency, the costs for the same long-range battery should decline by as much as 20 percent.

Citing the better outlook, that analyst raised his price target to $450 from $420, implying 42 percent upside over the next 12 months. He also adjusted his earnings per share estimates, predicting a year-end loss of $5.25 versus consensus forecasts of a $6.85 loss.

Growing demand for its sport utility Model X is also driving up the average selling price of its cars, widening margins further. But Tesla's biggest opportunity, Shah wrote, lies in Chief Executive Elon Musk's move to China.

Robin Ren, Tesla's head of worldwide sales, announced Tuesday that it plans to build its first factory outside of the U.S. in Shanghai. The announcement followed the Chinese government's decision to allow foreign electric vehicle makers to fully own auto factories there.

"China is arguably Tesla's most important regional market going forward. The company reported over $2 billion in sales in the China region in 2017, which we estimate equated to 15,000- 20,000 vehicles," Shah added. "This is despite the 25 percent import tariff levied on international original equipment manufacturers lacking domestic joint venture partners. China is preparing to lower its import tariff to 15 percent in July and remove the joint venture requirement, which should provide further tailwind."