Things are looking up for the stock market into the year's end, after a discouraging start to 2016. The earnings recession looks like it will end with third-quarter results, the value of mergers and acquisitions topped $100 billion in this weekend alone, and the largest initial public offering of the year is set to happen this week.

"I think all three of those things are essentially bullish signs for the market," said Randy Frederick, director of trading and derivatives at Charles Schwab.

"The groundwork is there for a pretty solid fourth quarter but it's got to keep going," he said.

The major U.S. stock indexes hit all-time highs this summer after one of their worst starts to a year. But investors have questioned whether stocks can sustain such high levels with little sign of fundamental growth. Corporate earnings have declined for four-straight quarters, while M&A and IPO activity has generally been sluggish, indicating lack of investment appetite in any potential growth opportunities.

This week's news could support better sentiment going forward.

"Whenever you see mergers you're betting whoever the acquirer is is saying … we're bullish on our prospects, they want to be bigger and they're buying something that is cheap. They're the ones that should know our industry the best," said Jeremy Klein, chief market strategist at FBN Securities.

The biggest corporate deal of the year came over the weekend when AT&T announced plans to purchase Time Warner for more than $85 billion. On Sunday, Rockwell Collins said it reached a deal worth more than $6 billion to acquire B/E Aerospace. Then on Monday TD Ameritrade announced an agreement to acquire Scottrade Financial Services in a deal valued at $4 billion, combining two of the biggest U.S. discount brokerages.

"An active M&A market is a positive thing for the IPO market," said Kathleen Smith, principal, Renaissance Capital, and manager of IPO-Focused exchange-traded funds.

Chinese shipping and logistics company ZTO Express is set to debut Thursday with a market value of about $1.2 billion and Morgan Stanley and Goldman Sachs, Asia, as underwriters.

"What makes ZTO important is it's so large. It'll be the largest IPO of the year," Smith said. "The Chinese IPOs this year in general, they've performed well. I don't think investors are afraid of China. They're looking for real growth."

If the pickup in initial public offerings and corporate deals continues, analysts said, the investment banking arms of big banks should be major beneficiaries, as that would lead to more fee revenue. Financial stocks are still one of the worst-performing sectors for the year so far as the Federal Reserve has held off on raising rates and capital markets activity slowed from last year.

The major banks reported better-than-expected earnings in the third quarter, helped by a surge in bond trading revenue. Morgan Stanley is also set to collect $120 million in fees — the second-largest ever for a single bank — if Bayer's deal for Monsanto closes, The Wall Street Journal reported last week.

To be sure, the total value of M&A so far this year is still more than 20 percent lower than it was in the same period last year, according to Dealogic. IPO activity this year is down sharply versus last year, with a 48.3 percent decline in total proceeds raised, according to Renaissance Capital.

Government regulation also remains a hurdle for both announced and future corporate deals. A $160 billion combination of Pfizer and Allergan fell apart earlier this year after the Treasury Department announced new rules to prevent inversions, or international deals that allow U.S. companies to pay less taxes. Shares of Pfizer are a touch lower for the year so far, while Allergan shares are more than 25 percent lower.

Then there is the question of profitable growth models for newer, tech-based companies. Twitter shares remain more than 20 percent lower for the year so far as major tech companies have decided not to bid for the social media company.

"On a negative note, Twitter has been on the block and hasn't been sold. There's always a price for a company. ... The strategic value has not been better than the dilution they would have to incur to own it," Renaissance's Smith said.

"It's a cloud over the Snap IPO that's going to come," she said, referring to a potential public offering valued at possibly $25 billion for the social media start-up.

In the near term, the outlook for stocks appears solid.

Third-quarter earnings point to growth for the first time in five quarters, while six companies are scheduled to go public this week. Those stock offerings should total about $2.2 billion in capital raised, putting October on track to surpass September as the most active month for IPOs this year, according to Renaissance.

"We've got M&A, we've got IPOs," Frederick said. "Typically you'd think that type of activity would be done in what is perceived as being a positive environment."

—Reuters contributed to this report.