Shaking off geopolitical flare-ups for now, analysts say the S&P 500 is taking aim at the 2,000 level, and the next round of earnings news could help.
Dozens of major companies reported Wednesday ahead of the open, and an even bigger batch report Thursday. On Wednesday, Boeing, Pepsico, Norfolk Southern reported ahead of the opening bell. AT&T, Facebook and Gilead report after the close. Of the 115 S&P 500 companies that reported as of Tuesday morning, 66 percent have beaten earnings per shares estimates and 64 percent beat revenue forecasts, according to Thomson Reuters.
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 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.
"We thought it would be more of a fall issue," said Mark Luschini, chief equity strategist at Janney Montgomery. "I think the market's anxiety has been raised somewhat because there's so many Fed officials talking about having to raise rates sooner."
Luschini said he does not think the market has adjusted the prospect of a rate hike sooner than midyear, and that would cause bond market volatility if it did. "I don't think the market has adjusted to that idea. I think it would be treated as a surprise," he said.
"I wouldn't be surprised if we close at 2050 at the end of the year," he said, adding that would be if there is no event that drives oil sharply higher or causes some other disruption for the economy.
Paulsen said he sees some signs the market could correct. "The multiple is close to breaking through 18.5 trailing," he said. At the same time, "there's more comfort than there has been in this entire bull run. There's a lot of lip service about corrections but none of us are running. It's not euphoric, but it's here. We don't have interest rate pressure. One bad inflation number, and we're there."
Paulsen said, however, there's not too much optimism around the market, and that in itself could help it break out to new highs. But also lurking is the possibility of Fed action because the economy and job market are improving. "I see some indicators that show we might be a lot closer to a Fed hike than most people appreciate," he said.
—By CNBC's Patti Domm