In a Thursday, June 14, 2018 file photo, Tesla CEO and founder of the Boring Company Elon Musk speaks at a news conference, in Chicago.
New York CNN Business  — 

Investors cheered Tesla’s deal with the SEC that keeps Elon Musk as CEO.

The stock surged 17% on Monday, more than wiping away Friday’s loss.

Over the weekend, Musk agreed to a settlement with the SEC that requires him to step down as Tesla’s chairman and pay a $20 million fine.

Under the settlement, which requires court approval, Musk will be allowed to stay as CEO but must leave his role as chairman of the board within 45 days. He cannot seek reelection for three years, according to court filings.

He accepted the deal “without admitting or denying the allegations of the complaint,” according to a court document.

Separately, Tesla (TSLA) agreed Saturday to pay $20 million to settle claims it failed to adequately police Musk’s tweet.

Last week, the government charged Musk with making “false and misleading statements” to investors on his Twitter account when he said he had secured funding to take the company private.

Besides the settlement news, Tesla has another milestone this week.

It is set to release third quarter production numbers that will show whether the production level it reached at the end of the second quarter — when it produced 5,000 Model 3 cars a week -— was a blip or sustainable.

CNN’s Jackie Wattles contributed to this report.