What happened 

Shares of Amazon.com (AMZN -0.36%) jumped 6.5% on Monday after Bank of America (BAC 2.33%) delivered stronger-than-anticipated financial results -- and sparked a broad rally in the stock market.

So what

Bank of America's revenue and earnings bested Wall Street's expectations, driven by trading gains and higher interest income. But it was CEO Brian Moynihan's comments that likely spurred many investors to take a more optimistic view of the economy. "Our U.S. consumer clients remained resilient with strong, although slower growing, spending levels," Moynihan said. 

Other macroeconomic news also likely contributed to the rally. The U.K. government reversed course on some recently announced tax cuts. The decision helped to assuage investors' fears that the controversial stimulus measures would further stoke inflation in one of Europe's most important markets.

Now what

If Moynihan is correct and consumers in the U.S. continue to spend at healthy levels despite soaring inflation and nearly constant warnings of a potential recession, Amazon would no doubt be a prime beneficiary. As one of the largest retailers in the country, Amazon's sales and profits are closely tied to consumer spending.

Amazon and its investors would also welcome greater economic stability in Europe. Many market prognosticators have warned that Europe's economy could fall into a deep and prolonged recession due in part to Russia's war with Ukraine and surging inflation. Amazon has a leading e-commerce presence in the U.K. and other European markets, so it stands to benefit if these countries can avoid that dire scenario.

Moreover, if these macroeconomic concerns prove overblown, Amazon's shares, which are still down more than 30% this year even after today's gains, could continue to head higher in the days and weeks ahead.