Trading Nation

The last two times the S&P 500 did this, the market topped out

The last time the S&P 500 did this, it marked a market top

The markets are having their best month since January.

But those gains have also pushed the S&P 500's price-to-earnings ratio close to 17 times forward earnings, a valuation level that marked the top in May and last fall.

The benchmark index must clear one key level to avoid facing the same fate, says Katie Stockton, managing partner at Fairlead Strategies.

"From a technical perspective, we do have a good deal of resistance right around 2,940. That's an approximation of the 2018 high, so it is a challenge for the S&P 500," Stockton said Monday on CNBC's "Trading Nation." 

The S&P 500 is within 1% of hitting its 2,940 resistance level. It last touched above that level in early May.

"If we do see a breakout from this little consolidation phase that developed last week, … I think we'll see a good test of that resistance and ultimately a breakout because intermediate-term momentum has already been proving behind the scenes," said Stockton.

There are enough positive catalysts in the market to keep the rally going, though challenges do remain, says John Petrides, portfolio manager at Point View Wealth Management.

"Where interest rates are and where inflation is, we still have room to run. I think we've been marinating one year now on tariffs and the earnings season upcoming is going to let us know if companies are able to navigate through the higher costs from tariffs given the slowdown in the global economy," Petrides said during the same segment.

A potential rate cut from the Federal Reserve could push stocks higher, Petrides says, though the central bank needs to be clear on the reason behind any move.

"The market is already starting to bake in a 25-basis-point cut by the Fed but if they do 50 basis points and really surprise the market, then I do think stocks can go higher, assuming that the language isn't the Fed is cutting 50 basis points because they see a pending recession," said Petrides.

The Federal Open Market Committee convenes on Tuesday for a two-day meeting, culminating with a Wednesday afternoon decision. Markets anticipate a 25-basis-point cut at the July meeting, according to the CME Group fed funds futures.