Tesla shares raced higher in after-hours trading Wednesday following the company's announcement that its factory in China had started production and quarterly financial results that beat expectations.

Shares in Tesla climbed more than 20 percent after the electric carmaker, which had been expected to post a loss, reported a profit of $143 million on revenue of $5.4 billion in the third quarter ending September 30.

Tesla said it is producing vehicles "on a trial basis" at its so-called Gigafactory in Shanghai, which will help boost global production and sales.

Tesla chief executive Elon Musk was optimistic that the Shanghai factory could begin cranking out Model Y vehicles by the middle of next year, and believed the new model has the potential to be a huge seller.

The company has been dogged by concerns it may not be able to ramp up production to meet demand and that Musk may have overstated Tesla's goals for sales and technology improvements.

Musk has predicted the company may be able to deliver self-driving cars by 2020, though analysts are skeptical.

Improvements to "Smart Summon," a feature that allows owners to summon their car with a smartphone app, are also expected, he said.

Musk touted the tool as a step toward fully autonomous vehicles and said that an over-the-air software update will be pushed out in the coming weeks.

'Robotaxi' future

Tesla, a contender in the race to produce fully self-driving cars, last month issued a software update that included "Smart Summon."

Under the feature, an app acts as a remote control which allows an owner to beckon their car, although Tesla advised they keep the vehicle in sight the whole time.

"We have Auto Pilot on the highway, and slow-speed Summon," Musk said while discussing the road to self-driving Teslas on an earnings call.

Electric carmaker Tesla said it boosted deliveries of its most affordable vehicle, the Model 3, as it delivered a surprise profit in the past quarter
Electric carmaker Tesla said it boosted deliveries of its most affordable vehicle, the Model 3, as it delivered a surprise profit in the past quarter. AFP / JUNG Yeon-Je

"Now we are working on stop lights, stop signs, windy narrow roads in suburban neighborhoods... You are going to want all of that."

Tesla could be at a point where it could upload software for its vehicles to have "robotaxi" functionality, albeit with a human ready to take control, by the end of this year, according to Musk.

"I mean the car will drive from one's house to work, most likely without interventions," Musk explained.

"It will still be supervised, but able to fill in the gap from low-speed autonomy with Summon and high-speed autonomy on the highway."

A version of the feature "reliable enough that you don't have to pay attention" to driving could be ready by the end of next year, but would be subject to approval by regulators, he added.

Going home again

Musk expected the Shanghai factory to hit "volume production" in a few months, and to make it possible to significantly ramp up Tesla production. He noted that a battery plant was also being built on the China site.

The shareholder letter said Tesla expects to boost vehicle deliveries and that "we are highly confident in exceeding 360,000 deliveries this year."

Tesla said deliveries of its Model 3, the most affordable vehicle in its lineup and a key to broader sales, reached 79.8 million in the past quarter, an increase of 50 percent compared to last year.

With Model 3 production pressure lifted, Tesla has been able to return engineering talent and other resources such as power cell production to its unit specializing in solar roofs and home power storage packs, according to Musk.

He felt that the Tesla Energy unit has long-term potential to be as big a business as its automotive division, or maybe even bigger.

"Now that car production is in a good place, we have restored resources to Tesla Energy so that is going to see crazy growth," Musk said.

"Tesla's mission from the beginning has been to promote development of sustainable energy and renewable energy vehicles."