RBC Capital Markets has lowered its end-of-year target on the S & P 500, but the firm still sees upside between now and then. Investors might also find some fresh opportunities in small-cap stocks, RBC found. The firm decreased its S & P 500 target to 4,200 from 4,700, Lori Calvasina, the firm's head of U.S. equity strategy, said in a note Friday. This implies a gain of about 5% from where the benchmark index finished Thursday. Due to uncertainty about the path of the economy, RBC removed its gross domestic product tests and replaced them with an assessment that's more focused on recent growth scare, crisis, and recession years. "There's a wide range of outcomes in our models with several scenarios coming in above our new target," Calvasina said in the note. "The message we are sending is that we see upside between now and year end but acknowledge that headwinds remain." "Looking beyond the numbers… if the U.S. economy is headed for the economic scenario that's currently embedded in consensus forecasts, or a relatively short and shallow recession that begins in 2H22 and wraps up in early 2023, we think it's possible that the S & P 500 has already bottomed," she added, "and if it hasn't, will find a bottom during the third quarter." Midterms as a catalyst U.S. midterm elections could be a catalyst for a bounce in stocks, she added. Although stocks are typically weaker in midterm election years, the S & P 500 tends to bottom about a month before the November event. If Republicans make a good showing in the congressional races, it could boost sentiment about the political backdrop for stocks over the long term, Calvasina said. With the uncertainty around a recession on the horizon, RBC has newly strengthened conviction on small-cap stocks and now recommends overweight positions in them. The note points out that small-cap stocks' performance over the past year has been consistent with an economy in recession, ISM manufacturing levels at typical troughs, and jobless claims that have spiked sharply. "Historically, recessions have tended to be good buying opportunities for Small Caps," Calvasina said. "They tend to underperform while stocks are falling heading into/early on in a recession, and then tend to lead once the broader US equity market has bottomed midway through the recession." — CNBC's Michael Bloom contributed to this story.