On Wednesday evening, Tesla (TSLA 1.85%) released its second-quarter 2013 earnings -- sending the stock soaring 14% in the next day's trading. Investors were probably pleased with the company's $0.20 EPS, using non-GAAP reporting. Net income increased to $26 million for the second quarter -- up 70% from previous quarter. On a GAAP basis, quarterly revenue increased to $405 million -- up from just $27 million year over year.

Tesla Alpha Model S. Source: Tesla.

Tesla's positive Q2 results were in contrast to some analysts' expectations of a $0.17-per-share loss. Bloomberg noted that even without including Tesla's $0.15 profit per share related to its leasing program, the company still beat analyst estimates. But it's important to mention that the company's zero-emissions vehicle, or ZEV, credits fell from $68 million in the first quarter of this year to $51 million in Q2. While the drop was expected, it makes Tesla's ambitious car-sales figures all the more pressing.

The company has a goal of delivering 21,000 vehicles by the end of 2013, and so far it's on track to hit that figure. This quarter, Tesla increased vehicle production by 25% -- manufacturing 500 vehicles a week, up from 400 per week last quarter. This helped Tesla sell a record number of 5,150 Model S vehicles in the second quarter, which was ahead of its 4,500-vehicle estimate. The increase in vehicle production is the at the core of Tesla's survival, so investors should be pleased to see it ramping up.

According to a letter to shareholders, Tesla's on track to achieve 25% gross margins in Q4 2013, excluding the ZEV credits. In its latest earnings call, Tesla CEO Elon Musk said: "We're about 12 points away from getting to the 25% gross margin target without ZEV credits. And if you look at, say, Q1 to Q2, we increased eight points. So obviously on average, between Q3 and Q4, we need to do six points per quarter." The company achieved 22% total non-GAAP gross margins -- up from 17% in the previous quarter.

Tesla says it has about $746 million in cash and cash equivalents and expects to significantly increase its R&D expenses in the next quarter. Much of the expenses will come from development of the right-hand-drive Model S and the forthcoming Model X. "From a product standpoint, the Model X is our primary focus, obviously at this point, Musk said on the call. "For the most part, our researchers are spending a lot of time personally on the Model X and trying to get the details right."

Though spending is expected to increase, the company said it will be "non-GAAP profitable and generate positive cash flow from operations every quarter this year excluding any benefit from ZEV credits." Tesla seems like it's on the right track, but some investors are still concerned that the reduction in ZEV credits will significantly hurt the company over the next two quarters.

That's why investors need to keep a sharp eye on Tesla's vehicle production rates. The company needs to produce -- and sell -- more vehicles to make up for the ramping down of vehicle credits. Investors could be handsomely rewarded if the company meets its sale figures for 2013 -- but investors would be wise to consider Tesla's high valuation. Receiving multiple awards, racking up a 99 rating from Consumer Reports, and posting a profit two quarters in a row have certainly helped push Tesla's stock price up, but the company is still at the beginning of a very long road, and the luxury electriccar market is anything but proven at this point.