The S&P 500 rose to another record high on the open Wednesday, before giving back gains. The Dow was off, but Nasdaq moved higher. On Tuesday, the Dow was at 17,113, up 61 points, and the Nasdaq was up 31 points at 4,456. The S&P 500 briefly closed at 1,983, a nine point gain. The S&P closed above 1,900 for the first time May 23 and above 1,800 in November.
The shooting down of Malaysia Airlines Flight MH17 in Ukraine last week and violence in the Gaza has shaken markets in the last several days.
"If we keep our focus—which we certainly did (Tuesday) today—on earnings, the markets could trend higher here. Today was a day where the global macro moved to the back burner. The focus was on earnings and you had some significant moves," said Art Hogan, chief market analyst at Wunderlich Securities.
Read MoreTwo giants show state of earnings
Wednesday's earnings reports were a mixed bag. Pepsico was trading at an all-time high after its positive earnings report, but Boeing slumped after its report missed the mark with weaker than expected revenues. Boeing's slide shaved about 20 points off the Dow.
Apple was up 0.8 percent Wednesday, even after its Tuesday earnings beat on the top line, but its revenue and guidance on the current quarter's revenue were less than expected. Dow component Microsoft shares were slightly lower its Tuesday afternoon report. Microsoft revenue were better-than-expected, but its earnings per share were lower.
James Paulsen, chief investment strategist at Wells Capital Management, said he sees the S&P 500 heading to 2,000, but he says the market has also likely made most of its gains for the year.
"I think we're really close. I still think the biggest risk for any kind of pullback would be if we overheat. The whole thing is Goldilocks. It's good enough growth. It's the solid growth we haven't had for a while with seemingly no inflation consequence. That's been the feeling lately. If there is a pull back this year, it will be because we upset that thesis. What I think could upset is some cost push pressures, and then I'd think we'd get a little panicky that the Fed is behind the curve," said Paulsen.
But analysts also say the market could have its shakeout moment when it begins to price in Fed rate hikes, or even if the economy picks up—or inflation picks up—enough to make it seem the Fed will move sooner than expected. The Fed has said it would complete tapering its bond buying program in October, and many Fed watchers believe it will start raising rates sometime after the middle of next year.