The stock market may heat up this summer if for no other reason than it's Joe Biden's first summer as president of the United States. 

BofA strategist Stephen Suttmeier crunched the historical numbers dating back to 1929, and found that the first year of a presidential cycle often brings with it a summer rally in the S&P 500 (^GSPC). Average returns from May (+1.9%), June (+0.49%) and July (+2.28%) have historically been the best three-month stretch for stocks in the first year of a presidency, Suttmeier's data shows. 

No explanation was posited for the historical quirk. But it could be hypothesized that the gains reflect ongoing optimism among investors on a new president's ambitious economic agenda. 

But once the weather begins to turn cooler, investor optimism appears to fade as presidential economic plans are shredded by opponents and kicked down the road. 

"The August-October and September-November are the two weakest three-month periods of the year, which suggest the risk of a fall correction," Suttmeier writes. 

Since 1929, the S&P 500 has dropped in the first year of presidency by an average 2.43% in August. Stocks have fallen about 57% of the time in that month. September isn't much better. The S&P 500 has declined on average 1.38% in September in the first year of a presidency, with declines happening roughly 44% of the time. 

Stocks have historically done well in the first term of a president.

Stocks tended to recover in October (average gain of 0.42%) and go on to notch gains in November (1.87% average increase) and December (1.19% average increase). 

2021 is likely to test the signals inherent in the historical data as the economy is dealing with multiple forces as it tries to recover from the COVID-19 pandemic. First is the headline risk from rising levels of inflation, and what that means to the easy monetary policy provided by the Federal Reserve throughout the pandemic. Investors will unlikely react kindly to any hints this summer by Fed officials of pulling back on ultra-loose monetary policy. 

Story continues

Meanwhile, there is growing pushback among lawmakers to Biden's $2.3 trillion infrastructure plan that is designed to rebuild the economy from the pandemic. Any smaller plan pushed through Congress by Democrats may unsettle investors banking on a boost to corporate profits from infrastructure. Any tax hikes to fund infrastructure investments may not be welcomed by investors, either. 

"I think within the next 12 months, we are going to be making that shift from an early, mid-cycle economy to a late cycle economy which tends to be a little bit more challenging for equities," said Jefferies Chief Financial Economist Aneta Markowska on Yahoo Finance Live.

If that's the case, there goes the bullish summer for stocks. 

Brian Sozzi is an editor-at-large and anchor at Yahoo Finance. Follow Sozzi on Twitter @BrianSozzi and on LinkedIn.

What’s hot from Sozzi:

  • AMD CEO: the semiconductor shortage will take time to correct

  • Kansas City Chiefs phenom Patrick Mahomes: I am trying to build a business empire

  • Foot Locker CEO: this is what our future holds

  • Intel CEO: here is when the chip shortage may end

  • Coca-Cola CEO: our business is rounding the corner from the pandemic

  • PGA Tour star Rickie Fowler: why I am bullish on this new $40 million bonus pool

Watch Yahoo Finance’s live programming on Verizon FIOS channel 604, Apple TV, Amazon Fire TV, Roku, Samsung TV, Pluto TV, and YouTube. Online catch Yahoo Finance on Twitter, Facebook, Instagram, Flipboard, SmartNews, and LinkedIn.

(305) 707 0888