Why the stock market selloff may be nearing an end

Earnings season could break the stock market's bear run, despite the oil slick that continues to trip up stocks.

Stocks rallied Tuesday but gave up big gains as oil's decline accelerated, dragging the S&P energy sector down over 1 percent and sending 15 of the S&P 500 energy names to 52-week or multi-year lows. The S&P energy sector is down over 4 percent so far this week and has declined 20 percent since June, making it the only major sector to be in a bear market.

But several analysts say they are not discouraged by the market's behavior and expect it to recover as investors focus on improving earnings instead. Oil has been a negative factor for a market that has been jittery about slowing global growth and other factors, like worries about a broader Ebola scare.

Earnings season, meanwhile, just kicked off with major banks reporting mixed results Tuesday, and Intel releasing positive after-the-bell results. Intel gained more than 2 percent in late trading, and stock futures were higher.

Earnings expected ahead of Wednesday's open include Bank of America, BlackRock, Charles Schwab, KeyCorp, Commerce Bancshares, PNC, MGIC Investment and St. Jude Medical. American Express, Netflix, Las Vegas Sands, eBay and Kinder Morgan report after the close.

Also important are retail sales, the Empire State survey, and PPI producer inflation data, released at 8:30 a.m. ET. Business inventories are at 10 a.m. and the Fed's beige book on the economy is released at 2 p.m.

Read MoreBonds are best investment in 2014, analyst says

"This drop in stocks we've had in the last few weeks, there's a pretty good chance it's already run its course. I think stocks represent good value," said Ed Keon, portfolio manager and managing director at Quantitative Management Associates. "This may be the time we get a full blown 10 percent correction, but there's also a chance we will not get a 10 percent correction and we head higher."

Keon said earnings should help lift the market. "I think in the long run, earnings are the driver of stock prices and this quarter the consensus is for growth of around 6 percent. I think when all the numbers are in it will be around 8 percent," he said. He expects earnings growth for the year to be up about 8 percent, and he sees an 8 percent gain for the S&P 500 this year.

Weaker oil and a stronger dollar should ultimately be good for stocks, as investors see the benefits of lower energy costs on the economy, he said.

Read MoreOil slide wipes out stock market gains

Oil prices could remain under pressure, after West Texas Intermediate plunged nearly 5 percent to $81.84 per barrel. The combination of weaker demand growth and sufficient supply has pressured prices, as Saudi Arabia, the world's largest oil producers, has set on a course to cut prices instead of production.

"The question is, are these fears of slowing economic conditions and good supply…are they lasting enough to keep the market here," said Gene McGillian, analyst with Tradition Energy. "Is the increased production coming around the world -- North America in particular -- created a new paradigm where instead of having people targeting $100, they'll be targeting $85 (Brent)."

As oil plummeted, the S&P 500 fell back from earlier double digit gains Tuesday, to close nearly 3 points higher at 1877 -- 7 percent below its high. The Dow lost 5 to 16,315, while the Nasdaq was up 13 at 4227.

Trader on the floor of the New York Stock Exchange.
Getty Images
Trader on the floor of the New York Stock Exchange.

The small cap Russell 2000 was an outperformer with a 1.2 percent gain, but it remains 12.5 percent below its highs.

"[Monday], small caps outperformed in a down tape so maybe the trend is going to be our friend here," said Steven DeSanctis, director of small cap research at Bank of America Merrill Lynch.

Small caps may have bottomed, he said. "You're basically getting double digit earnings growth with a double digit decline in price," he said.

Last year, the opposite occurred with the index up 38 percent and earnings growth of just 10 percent. "Valuations ballooned to 19.5 (price-to-earnings ratio), and now you're down to 16.2," he said. The Russell has been viewed as a sort of canary in a coal mine, with traders speculating its weakness would spread ahead of the selloff in major indices.

Read More'Buy the dip' seems done: Sterne Agee technician

"People are really worried about the slowing of China, Japan and Europe. What does that mean for earnings? Ultimately, the bottom line for fundamentals for companies have been really, really solid," he said. "For me, the next week or week after is when we start to sift through the earnings. We're going to get a better feel for how things are going here."

DeSanctis said the small cap universe is not as affected by oil prices as large caps, but market volatility harms small caps. The small cap energy stocks were 24 percent higher for the year but have turned 40 percent lower with the drop in oil and gas prices. One positive is that consumers should benefit from lower prices.

Earnings for small caps should also be less affected by slowing global growth as just 18 percent of revenues are from outside the U.S., but he said the small companies do have large cap, multinational customers so they could be hurt indirectly.

"It comes down to what you think about the overall U.S. economy…The U.S. economy is tracking around 3 percent for the third and fourth quarter. Small cap earnings (growth) should be somewhere in the teens, and the estimate is about 8 percent," he said.

Read MoreOil demand to 'rise tentatively' in 2015: IEA

DeSanctis said the small caps were heavily impacted by the seasonal volatility of September and October this year.

Bespoke Investment Group, meanwhile, points out that just about 16 percent of the S&P 500 stocks are above their 50-day moving average, and when that level has fallen below 20 percent is a bullish indicator in the past, it's shown to be statistically positive for stocks. In 93 percent of the times, the market was higher a year later with an average gain of nearly 17 percent.

Bespoke said it views the indicator as a positive for the market and says while the correction could continue for a few more days, the medium and long-term outlook for stocks is positive.

Keon said a lot of events converged to bring down the market, such as the Ebola scare. "Complacency is one reason it was so sharp and unexpected. Waking investors from their stupor once in a while is a good thing. We're still in a bull market and I think we're going to head higher before the year is out," he said.