October turned out to be a nice treat for investors. Those who stayed in are having an extra Happy Halloween.

shutterstock_165155444_600

The S&P 500 is on track to end the month about 1% higher. The NASDAQ is up 1.5% and the Dow is up 0.9% after another dramatic 221 point gain Thursday. No, October won’t be the best month of the year. But those are solid gains. And we might not be done yet. According to a survey of investment strategists, the S&P 500 should end the year a tad over 2,000. The index is close to that level, but not there yet.

So what drove the big turnaround? It’s pretty straightforward: earnings, earnings, earnings. Investors like when companies beat on earnings, sales and profits, and by and large, that’s what the market is getting. Over 75% of companies in the S&P 500 that have reported earnings so far have beaten analysts’ estimates, according to S&P Capital IQ.

Businesses also give a sense of what they expect in the months ahead. Again, with a couple of notable exceptions such as IBM (IBM, Tech30) and Amazon (AMZN, Tech30), the outlook isn’t looking too bad. All 10 sectors of the S&P 500 are predicted to show earnings growth this quarter. The overall picture is okay, and that is making investors a lot less nervous.

The VIX volatility index — the market’s fear gauge — is a good reminder of just how much the market panic has subsided. As fears about everything from Ebola to a stalling Europe to a possible early rise interest rates spooked investors, the VIX spiked. It peaked mid-month — briefly hitting the 30 mark on its worst day — and is now back under 15, a very low mark.

Going forward, there are still headwinds, but the consensus is that the U.S. economy is growing and companies and stocks will continue to benefit. A Goldman Sachs research note Thursday predicts 3% GDP growth the next few years. While Europe and other parts of the world remain troubled, Goldman reminds that foreign sales account for about a third of revenue for S&P 500 companies.