Elon Musk says his Tesla electric car company is the most shorted stock in history, citing that as one of the reasons he's thinking about chucking the public markets and taking the $64 billion company private once more.

But the stock market — and investors — have been good to Tesla, notwithstanding the high-rolling bets against it at the moment.

Tesla raised $226 million in its debut on the Nasdaq on June 29, 2010. In their first day of trading, the shares rose 41 percent. A $1,000 investment at the $17 IPO price would be just over $22,200 now.

Musk owns about 20 percent of the shares and has invested several million of his own $19 billion fortune into it in the years since the IPO. A month after the IPO, his stake was valued at $512 million, according to FactSet. Now it is $12.8 billion.

Shares of Tesla are up more than 23 percent in the last week alone.

Just weeks before IPO day, Toyota Motor Corp. agreed to invest $50 million in Tesla in a joint venture to develop the electric car technology. The private investment was finalized shortly after the IPO was completed, and Toyota and Tesla remained partners until the end of 2014. Then, later in 2010, battery cell supplier Panasonic Corp. put $30 million into Tesla.

Toyota sold its Tesla shares by the end of 2016.