The stock market just had its best post-midterm performance in nearly 40 years