Shares of Nio Inc. shot up 8.8% into record territory in premarket trading Tuesday, after the China-based electric car maker reported a second-quarter loss that was about half what was expected as revenue more than doubled, and provided an upbeat deliveries outlook for the current quarter. The net loss narrowed to RMB1.21 billion ($173.9 million), or RMB1.15 a share, from a loss of RMB3.31 billion, or RMB3.23, in the year-ago period. Excluding non-recurring items, the loss per share was RMB1.08, compared with the FactSet consensus for a per-share loss of RMB2.15. Gross margin swung to positive 9.7% from negative 24.1% a year ago. Total revenue rose 146.5% to RMB3.72 billion ($535.4 million), to beat the FactSet consensus of RMB3.51 billion. Deliveries reached a quarterly record of 10,331 vehicles, and the company expects a further increase to 11,000 to 11,500 vehicles in the third quarter. “Beyond the strong order growth, we are proud to reach a milestone quarter with respect to the key financial metrics of the company, highlighted with the historically high vehicle gross margin of 9.7%, lowest-ever operating losses and more importantly, a positive cash flow from operations for the first time in our history,” said Founder and Chief Executive William Bin Li. The stock, which is on track to open above the July 10 record close of $14.98, has more than tripled (up 253.5%) year to date through Monday, while shares of U.S. rival Tesla Inc. have run up 239.1% and the S&P 500 has gained 4.0%.Market Pulse Stories are Rapid-fire, short news bursts on stocks and markets as they move. Visit MarketWatch.com for more information on this news.