A deal on a $1 trillion infrastructure bill helped push stocks to all-time highs Thursday, here’s what investors need to know.