Updated from 10:55 a.m. ET, Tuesday July 11. 

Stocks moved mostly higher on Tuesday, July 11, as a surprise turn higher in crude oil prices helped drive gains in the energy sector.

The S&P 500 hovered around its flatline, the Dow Jones Industrial Average increased 0.12%, and the Nasdaq rose 0.25%.

Crude oil prices sprung higher in late-morning trading Tuesday after spending much of the earlier session in the red. Gains added to a rally on Monday, July 10, as investors grew optimistic ahead of a meeting of the Organization of Petroleum Exporting Countries later this month. Major oil-producing countries are set to meet to discuss current production limits on July 24. Nigeria and Libya could participate in production cuts after the two were invited to attend that meeting.

Prices had been under pressure earlier Tuesday after the International Energy Agency forecast a 53% increase in shale investments in 2017, growth that would add more weight to the global supply-demand imbalance. In its monthly report, the IEA said the largest planned increase in upstream spending this year in percentage terms came from the U.S., particularly in "shale assets that have benefited from a reduction in break-even prices as a result of a combination of improvement in costs and efficiency gains."

West Texas Intermediate crude was up 1% to $44.85 a barrel on Tuesday.

The energy sector was one of the best performers on Tuesday. Major oil companies including Exxon Mobil Corp. (XOM) , Chevron Corp. (CVX) , Schlumberger Ltd. (SLB)  and Statoil ASA (STO) moved higher, while the Energy Select Sector SPDR ETF (XLE) increased 0.5%. 

Federal Reserve Chair Janet Yellen heads to Capitol Hill later this week and Wall Street will be paying close attention to her assessments of the U.S. economy and how it might be affected by monetary-policy tightening. Yellen is set to deliver her semiannual testimony on monetary policy to the House Financial Services Committee on Wednesday, July 12, at 10 a.m. ET, and then to the Senate Banking Committee on Thursday, July 13, at 10 a.m. ET.

In its semiannual monetary policy report delivered before Yellen's testimony, the Federal Reserve said it expects "gradual" increases in the federal funds rate and said it's likely to start trimming reinvestment of proceeds from in its fixed-income portfolio later this year. The report was released on Friday, July 7.

The second-quarter earnings season kicks off at the end of the week with a number of notable reports from the banking sector. Citigroup Inc. (C) , JPMorgan Chase & Co. (JPM) , PNC Financial Services Group (PNC) , and Wells Fargo & Co. (WFC) are each set to disclose their quarterly financial performance on Friday morning.

Citigroup and Wells Fargo are holdings in Jim Cramer's Action Alerts PLUS Charitable Trust Portfolio. Want to be alerted before Cramer buys or sells C and WFC? Learn more now.

Overall, analysts anticipate another quarter of above-average strength. CFRA Research said it anticipates 6.2% year-over-year earnings growth among S&P 500 companies, better than a 1.7% earnings decline seen in the same quarter a year earlier. The energy sector is expected to lead the pack, recovering from weakness over the previous two years.

"CFRA expects growth will come in better than the initial expectation as economic data remains stable, consumer confidence is at a high not seen since 2001, manufacturing data is improving and energy is expected to become a tailwind for the index," Lindsey Bell, investment strategist at CFRA Research, wrote in a note.

The number of job openings in May declined as hiring activity picked up. The Job Openings and Labor Turnover Survey for May showed openings at 5.666 million, narrower than an anticipated 5.975 million. Hiring increased by 429,000 to 5.47 million, its largest increase since March 2004.

In Fedspeak Tuesday, Fed Governor Lael Brainard will deliver the keynote address at the Conference on Normalizing Central Banks' Balance Sheets in New York, and Minneapolis Fed President Neel Kashkari will participate in an economic roundtable.

Retail stocks were on watch Tuesday after Amazon.com Inc.'s (AMZN)  Prime Day kicked off late Monday. The event will run run through July 12 at 3 a.m. Some analysts project sales of between $800 million and $1 billion for Amazon's third Prime Day event. Major retailers including Best Buy Co.  (BBY) , Gap Inc. (GPS) , Dick's Sporting Goods Inc. (DKS)   and Guess? Inc. (GES)  sold off on Monday on worries over increased competition from Amazon.  

Retailers need mergers-and-acquisitions activity to stay alive, Jim Cramer wrote in his daily column over on our premium site for investors, RealMoney. Get his insights with a free trial subscription.

PepsiCo Inc. (PEP)  fell nearly 1% even after besting profit and sales estimates over its second quarter. The soda company reported earnings of $1.50 a share on revenue of $15.7 billion. Analysts expected earnings of $1.40 a share on revenue of $15.6 billion. Organic revenue increased 3.1%, driven by growth in its Frito-Lay North America and North America beverages segments. 

PepsiCo is a holding in Jim Cramer's Action Alerts PLUS Charitable Trust Portfolio. Want to be alerted before Cramer buys or sells PEP? Learn more now.

Rent-A-Center Inc. (RCII) increased 7% after reporting that it had received, and rejected, an unsolicited buyout offer. The bid from private-equity firm Vintage Capital had valued shares at a premium of 35% at the time of the offer on June 20. Rent-A-Center's board said the bid "significantly undervalues" the company. 

Snap Inc. (SNAP) fell 5.6% on Tuesday, putting the stock further below its initial public offering price of $17. On Monday, the stock declined 1.1% to $16.99, finishing the session below the March IPO price for the first time. The stock decline came after Credit Suisse analyst Stephen Ju maintained his outperform rating on Snap, but lowered his price target to $25 from $30. Ju cited his concerns over monetization rates.  

Halcon Resources Corp. (HK) rocketed nearly 40% higher on Tuesday after agreeing to sell operated assets in the Williston Basin to an affiliate of Bruin E&P Partners for $1.4 billion in cash. The deal is expected to close within 60 days. Current production of the assets being sold is approximately 29,000 barrels of oil equivalent per day.

Michael Kors Holdings (KORS)  was the worst performer on the S&P 500 after MKM Partners initiated coverage of the company with a "sell" rating and $26 price target. The price target represents a potential downside of 27% from the stock's previous closing price. The firm says there is a threat that Kors will shift its focus to lower margin products.

Visit here for more of the latest business headlines.

Eat, Drink and Talk Money with Jim Cramer

Meet Jim Cramer at an exclusive reception at his Bar San Miguel in Brooklyn, N.Y., on Tuesday, July 25, from 6:30 p.m. To 9 p.m.

The evening will start with a screening of Jim's CNBC show Mad Money. Afterwards, Jim will join the party fresh off of the CNBC set to mingle, take photos and answer your investing questions.

Tickets include dinner, drinks and an autographed copy of Jim's book Get Rich Carefully.

Click here for more information or to buy tickets.

Where: Bar San Miguel, 307 Smith St., Brooklyn, N.Y.

When: Tuesday, July 25, 6:30 p.m. to 9 p.m.

If you liked this article you might like

This Is How to Avoid Becoming Amazon Roadkill

Wall Street Overlooks Trump's North Korea Threats to Hit New Records

Best Buy Disappointment Sends Retailers Into a Spin