Stocks held record highs by mid-afternoon Monday as crude oil settled at its highest level in more than three weeks. 

The S&P 500 added 0.4%, the Dow Jones Industrial Average rose 0.41%, and the Nasdaq increased 0.6%. All benchmark indexes hit all-time intraday highs on Monday and were on track to settle at record closes. 

Crude oil moved higher for the third straight day on high hopes for a production freeze agreement from major oil-producing countries. Reports suggested Russia's energy minister has been in talks with Saudi Arabia to achieve oil market stability. The Organization of Petroleum Exporting Countries is set to meet next month.

West Texas Intermediate crude oil, the U.S. benchmark, closed 2.8% higher at $45.74 a barrel, its best settlement since July 20.

"As gossip of production cuts from OPEC resurface, the Russian energy minister Alexander Novak stated that Russia is interested in entering into production negotiations," said Daniel Holder, commodity analyst at Schneider Electric. "The chance of a global coordinated cutback is a bullish factor."

The S&P 500 ended last week just points from another new record as disappointing data on Friday failed to overshadow a blockbuster Thursday. A surge in crude oil and better-than-expected quarterly performance from the retail space helped to drive benchmark indexes to record closes on Thursday, the first time the S&P 500, Nasdaq and Dow have all beaten records on the same day since 1999. The Nasdaq also netted a new record close on Friday afternoon with minor gains.

Builder confidence improved in August, a sign that construction could catch up with demand in coming months. The National Association of Home Builders index rose by two points to 60 in August, above an estimate of 59. The NAHB said new construction and new home sales are on the rise in most areas of the U.S.

Business activity in the New York region, however, worsened in August, according to the Empire State Manufacturing Survey. Manufacturing weakened to negative 4.2 in August, down from positive 0.6 in July. The reading came in below estimates.

Mid-America Apartment Communities (MAA) - Get Report moved higher on Monday morning after confirming plans to purchase Post Properties (PPS) . The all-stock deal values Post Properties at roughly $3.9 billion. The offer is equivalent to around $72.53 a share and values Post Properties at a 17% premium to Friday's close. The deal is expected to close in the fourth quarter.

Xylem (XYL) - Get Report announced an agreement to purchase utility data analytics company Sensus for roughly $1.7 billion in an all-cash deal. The water treatment company said Sensus' technologies will offer its customers "greater energy efficiency, water conservation and improved life-cycle costs." The acquisition is expected to close by the end of the year.

Twitter (TWTR) - Get Report traded at seven-month highs after a New York Times report said the social networking platform is in talks with Apple (AAPL) - Get Report for an app on Apple TV streaming a  number of National Football League games. Twitter already has a deal with the NFL to stream a select number of football games.

European markets climbed on Monday after Germany's Bundesbank expressed confidence in the eurozone's economic recovery. In a monthly report on the European Central Bank's meeting, the Bundesbank said the United Kingdom's decision to exit the European Union had not ruined economic stability. ECB President said financial markets had shown "encouraging resilience" since the decision was announced late June. Updated economic forecasts will be released when the ECB meets in September.

Volkswagen (VLKAY) and H&M (HNNMY) shares were also boosting European markets. The automaker climbed after Germany's motor authority approved technical fixes for 460,000 of the models affected by a diesel engine fault. Volkswagen reached a settlement with U.S. authorities last month over emissions-cheating allegations. Clothing retailer H&M was also higher after reporting 10% sales growth in July.