As the bull market sets its sights on its tenth year, companies are finally starting to spend more.

Throughout this bull market, capex has remained a "missing link," said BofA/Merrill Lynch analysts in a Jan. 2 note. But now, S&P 500 capex guidance is well above its historical average and optimism abounds.

Companies are planning to spend more, analysts said. The three-month ratio of above -- versus below -- consensus capex guidance is at 1.74. While that's slightly lower than last month's 1.85 ratio reading, it remains near its highest level in more than three years.

"Capex has been a missing link during this bull market, and a pickup in demand, clarity on tax policy and signs of tighter capacity could unleash a pickup from low levels," Merrill Lynch said.

Aside from capex, firm management remains more optimistic than analysts on earnings. The three-month ratio of above -- versus below -- consensus earnings guidance is near a seven-year high at 1.22, up from 1.15 and double its historical average of 0.64, analysts wrote.

More of What's Trending on TheStreet:

More from Stocks

Apple Stock Overcomes Trade Troubles to Post Gain on Monday

Apple Stock Overcomes Trade Troubles to Post Gain on Monday

Economist Perspective: Can U.S. Dollar Keep Its Momentum in 2019?

Economist Perspective: Can U.S. Dollar Keep Its Momentum in 2019?

Stocks End Day in the Green as Dow, S&P Overcome Slow Starts

Stocks End Day in the Green as Dow, S&P Overcome Slow Starts

These Bank Stocks Could Be Oversold in the Market Wreckage

These Bank Stocks Could Be Oversold in the Market Wreckage

Nutrisystem Soars on Deal to Be Acquired by Tivity Health

Nutrisystem Soars on Deal to Be Acquired by Tivity Health