Stocks rallied again Tuesday to near record highs, showing significant resilience against a challenging backdrop of high geopolitical tensions, historic tariffs, elevated interest rates and recession angst.