The S&P 500 Index (SPY  ) and Nasdaq Composite (QQQ  ) each reached another all-time high on Monday as market optimism continues to push stocks higher ahead of a week of big tech earnings.

The broader market index rose 0.14% to close at 6,305.60, marking its first time closing above the 6,300 threshold, while the tech-heavy Nasdaq advanced nearly 0.4% to settle at a record 20,974.17 -- both indexes also reached fresh intraday highs earlier in the session. The Dow Jones Industrial Average (DIA  ) slipped about 20 points to end the session at 44,323.07.

The S&P 500 and Nasdaq are also coming off of a week of gains, as traders maintain rosy outlooks despite major headwinds from multiple market-sensitive deadlines over the next few weeks: earnings reports from mega-caps including Alphabet (GOOG  ) (GOOGL  ), Meta Platforms (META  ), Amazon (AMZN  ), Tesla (TSLA  ), Nvidia (NVDA  ) and Apple (AAPL  ); the Federal Reserve's upcoming policy decision on July 30; and President Donald Trump's "Liberation Day" on Aug. 1.

On Sunday, U.S. Commerce Secretary Howard Lutnick said August will be the "hard deadline" for higher tariff rates to begin for most trading partners, telling CBS News that "nothing stops countries from talking to us after August 1." Trump's tariff deadline has been extended since he first announced his so-called "reciprocal" tariff rates on April 2.

Traders, however, seem less concerned about the upcoming tariffs, which include a 50% duty on imports from Brazil, 35% from Canada, 30% on goods from the European Union and Mexico, and 25% levies for Japan and South Korea. Instead, much of the market's attention has turned towards earnings reports from Alphabet and Tesla due out this week.

Bank of America analyst Justin Post wrote in a note on Friday that advertiser spending on Google Search -- a key revenue driver for Alphabet -- grew during the quarter despite concerns that the rise of generative artificial intelligence platforms could impact the search engine's market dominance.

"Our channel checks suggested Google ad spend growth was stable in 2Q, with monthly ad spending growth improving through 2Q," Post wrote. "We think improving spend as 2Q progressed would be a positive given fears on going AI competition."

For Tesla (TSLA  ), Bank of America analyst Federico Merendi wrote in a Monday note that the electric vehicle maker is likely to be negatively impacted by Trump's tariffs, as the company relies on batteries made in China.

"Although Tesla produces all its vehicles in the U.S. and it manufacturers vehicles with a high proportion of content made in North American, the exposure to tariffs is not insignificant," Merendi wrote.

Alphabet and Tesla are both set to deliver their second-quarter earnings results after market close on Wednesday.