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

Biotech's Coming Back to Life: Cramer's 'Off the Charts'

Biotech's Coming Back to Life: Cramer's 'Off the Charts'

Jim Cramer: Bank of America Expects 4% Economic Growth in Q2

Jim Cramer: Bank of America Expects 4% Economic Growth in Q2

Google, Morgan Stanley, IBM and Texas Instruments - 5 Things You Must Know

Google, Morgan Stanley, IBM and Texas Instruments - 5 Things You Must Know

Video: Here's How Goldman Sachs May Change Under David Solomon

Video: Here's How Goldman Sachs May Change Under David Solomon

J&J Vows to Fight Verdict Linking Baby Powder to Ovarian Cancer

J&J Vows to Fight Verdict Linking Baby Powder to Ovarian Cancer