Crude oil supported more gains for equities on Monday, though trading continued to show caution.

It took much of the day, but stocks decided upon a direction by the final hours of trading and stuck to it through the close. The S&P 500 inched 0.1% higher, the Dow Jones Industrial Average added 0.12%, and the Nasdaq gained 0.28%.

Equities have seen a tremendous rebound after a rough start to the year. Benchmark indexes stretched their winning streak to five weeks on Friday, a record not seen since October last year. Investors can thank the Federal Reserve, which inspired the bulls after a comfortingly dovish statement last week, and crude oil, which has bounced to a level around $40 a barrel. Stocks are currently trading at 2016 highs.

A Fed rate hike could come sooner than some anticipate, despite assurances last week that the central bank would tighten only gradually: San Francisco Fed President John Williams said the economy is "looking great" and that an April or June hike isn't out of the question. The central bank raised rates for the first time in nearly a decade in December.

"All else equal, assuming everything else is basically the same and the data flow continues the way I hope and expect, then April or June would definitely be potential times to have an increase in interest rates," Williams told Market News International. Williams is not a voting member of the Fed's monetary policy committee this year.

Crude oil broke higher on Monday after earlier weakness as commodity traders took positions ahead of the expiration of April crude contracts at the end of the day. Oil had been under pressure earlier after Friday's news of an increase in active U.S. oil rigs triggered fears over oversupply. West Texas Intermediate crude closed 1.2% higher at $39.91 a barrel.

Oil closed higher, but the energy sector remained under pressure. Major oilers Chevron(CVX) - Get Report , Exxon Mobil(XOM) - Get Report , ConocoPhillips(COP) - Get Report and Royal Dutch Shell (RDS.A) closed in the red, while the Energy Select Sector SPDR ETF (XLE) - Get Report fell 0.54%. 

It was merger Monday on Wall Street, with several high-profile negotiations coming to a close. Hot takeover target Starwood Hotels (HOT) agreed to a raised bid from Marriott(MAR) - Get Report  on Monday morning. The new offer values Starwood at $13.6 billion, above an offer from Chinese company Angbang Insurance for around $13.2 billion. Starwood shares climbed 4.5%.

IHS (IHS) announced plans to merge with Markit (MRKT) in an all-stock deal worth more than $13 billion. IHS will own about 57% of the company, while Markit will hold the remainder. The combined company will be named IHS Markit and will be located in Markit's headquarters in London. The deal is expected to close in the second half of the year.

Sherwin-Williams(SHW) - Get Report fell 5% after agreeing to acquire Valspar(VAL) - Get Report in a deal worth $9.3 billion. Sherwin-Williams agreed to pay $113 per Valspar share, a 52% premium to its Friday close. Valspar shares were up more than 23%.

Valeant Pharmaceuticals (VRX) rose 7.4% after announcing plans to replace J. Michael Pearson as its CEO. Pearson has overseen a rough couple of months in which shares have tanked on an investigation into accounting inconsistencies with its pharmacy partner Philidor. The company also said Monday it appointed activist investor Bill Ackman to its board.

Apple(AAPL) - Get Report unveiled a new four-inch iPhone, the SE, at an event Monday. The tech giant said the new models will start at $399, far less than many had expected. The company also dropped its price on its Apple Watch to start at $299.

Apple is a holding in Jim Cramer's Action Alerts PLUS portfolio.

Exclusive Look Inside:You see Jim Cramer on TV. Now, see where he invests his money and why Apple is a core holding of his multi-million dollar portfolio.Learn more now.

In economic news, the number of existing home sales in February tumbled 7.1%, a three-month low and a symptom of high prices and lower inventory. Sales in the U.S. fell to a seasonally adjusted rate of 5.08 million, according to the National Association of Realtors. Economists had expected a reading of 5.3 million.