New York CNN Business  — 

The Nasdaq Composite (COMP) hit yet another all-time high as tech stocks were among the best performers on Thursday.

The index closed up 0.5%, exceeding Wednesday’s closing record. It was the third time it eked out a fresh all-time high this week.

Meanwhile the Dow (INDU) finished down 1.4%, or 361 points, while the broader S&P 500 (SPX) fell 0.6%.

Stocks had a bit of a volatile day on Thursday, starting the session mixed and selling off throughout the morning after the Supreme Court dealt a blow to the Trump administration.

The court ruled that prosecutors may seek President Donald Trump’s financial documents and tax returns, though that’s unlikely to happen before the US election.

The market sold off in what seemed to be a knee-jerk reaction following the ruling, said Keith Lerner, chief market strategist at SunTrust.

The stock market has been extremely volatile in the past several months — selling off when coronavirus cases surged and rebounding on hopes for an economic recovery. Yet reminders abound that the economy is still struggling in form of store closures, bankruptcies and millions more workers filing for unemployment claims.

At the same time, the Supreme Court ruling is forcing investors to think about the presidential election in November, adding more uncertainty into an already murky future. The ruling might have unnerved some investors who until now didn’t take former Vice President Joe Biden’s bid for the White House seriously, said Fawad Razaqzada, market analyst at ThinkMarkets.

Traditionally, a Democratic administration would be seen as less business-friendly than a Republican one, though this election cycle seems to be turning that idea on its head as stocks have risen even as Biden has pulled ahead in polls.

For a long time during this term, Trump was considered a relatively market-friendly candidate, not least because of his promises of a massive infrastructure bill and now because of unprecedented fiscal stimulus to get the economy through the pandemic recession.

But the prospect of Biden’s moderate policies that could help a weakened economy seems to be appealing to investors.JPMorgan (JPM) is even predicting that a Democratic sweep in the fall could help stocks.

Biden spoke on his economic agenda this afternoon, including his plan to spur manufacturing and create new jobs on top of bringing those lost to the pandemic back.

Matt Egan and Eric Bradner contributed to this report.

Clarification: A previous version of this story and headline mischaracterized the Supreme Court’s ruling. The court did not compel the President to hand over his returns, but held that prosecutors may seek those documents.