Easy:
The dollar is collapsing due to the presumed budget deficit to infinity.
The increasingly worthless dollar is being reflected in the nominal value of the indexes increasing; while the value of the underlying businesses and their earnings and cash flows is plummeting as they are denominated in those same increasingly worthless dollars.
‘The Market’ doesn’t believe a Democrat win is good, it believes it is bad; hence the collapsing dollar.
proably also explains flight to crypto, at least partially