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

Market Movers: Tech Earnings

Market Movers: Tech Earnings

Cloud Gaming Adds Growth Opportunity for Microsoft

Cloud Gaming Adds Growth Opportunity for Microsoft

Dow Dives Sharply on Rates Fears, Tech Shares Sink Nasdaq

Dow Dives Sharply on Rates Fears, Tech Shares Sink Nasdaq

Throwback Thursday: To Trade or Not to Trade Paypal

Throwback Thursday: To Trade or Not to Trade Paypal

Daimler's Going Autonomous With Nvidia to Take On Uber, Ride-Hailing Race

Daimler's Going Autonomous With Nvidia to Take On Uber, Ride-Hailing Race