The stock market is going to end the year flat, according to a quant guru.

The S&P 500 was down nearly 20% at its low last month as investors worried about rising inflation, higher interest rates, and the potential of an economic recession.

The US will avoid a recession this year thanks to a strong US consumer, a continued post-COVID economic reopening around the world, and the reopening of China's economy following the COVID-19 shutdowns.

The ongoing Russia-Ukraine conflict is the biggest risk for markets. The conflict is expected to be solved in the second half of the year. If that is the case, the commodity pressure could ease, helping to tame inflation.

Corporate buybacks are poised to hit a record level of $1.2 trillion, which is helping prop up the stock market. The Federal Reserve kicks off its $9 trillion balance sheet reduction strategy today, but investors are still concerned about its path towards tightening monetary policy.

The potential headwind is already priced into the markets.

The market already absorbed and priced in the change in monetary policy and significant tightening of financial conditions as inflation peaked or is peaking now.

The Fed should be able to take a break from its interest rate hikes ahead of the US elections due to the fact that inflation is on the verge of peaking.

Retail investors will be the final boost to the stock market.

Retail buying that was funded withStimulus checks last year will not stop as it can now be funded by job paychecks, which is also more sustainable.

The bullish view of the stock market doesn't mean investors should buy the entire market. Rather than buying stocks that are perceived to provide protection during an economic downturn, investors should buy beaten down innovation stocks.

While a recession will not happen, these stocks that are trading near all-time high valuations are not a hedge for any scenario: if there is a recession, multiples will go down, and if there is no recession, there will be rotation out.

May is a template for the year and record dispersion provides opportunities. The S&P 500 was virtually flat in May.