Stocks made gains on Wednesday, despite upward moves in oil prices and interest rates. The Dow Jones Industrial Average (DJINDICES:^DJI) and the S&P 500 (SNPINDEX:^GSPC) both added nearly a percentage point.

Today's stock market

Index Percentage Change Point Change
Dow 0.75% 182.33
S&P 500 0.97% 25.87

Data source: Yahoo! Finance.

Crude oil surged over $70 a barrel after the announcement that the U.S. will exit the Iran nuclear deal. The Energy Select Sector SPDR ETF (NYSEMKT:XLE) jumped 2%. Interest on 10-year Treasurys broke through the 3% level, boosting financial shares, with the Financial Select Sector SPDR ETF (NYSEMKT:XLF) closing up 1.5%.

As for individual stocks, Walmart (NYSE:WMT) announced it is buying a majority stake in an Indian e-commerce company, and Twilio (NYSE:TWLO) reported higher-than-expected growth in its most recent quarter.

Cartoon figures and upward graph.

Image source: Getty Images.

Walmart bets big on India

Walmart announced that it is investing in the rapidly growing Indian e-commerce market in a big way by buying a 77% interest in privately held Flipcart Group for $16 billion. Confirmation of the long-rumored deal, which will be a drag on earnings for years to come, caused Walmart shares to fall 3.1%.

The acquisition will be financed with a combination of newly issued debt and cash on hand. Walmart officials said that the transaction will have a negative impact of $0.25 to $0.30 on fiscal 2019 EPS and will lower EPS by $0.60 in fiscal 2020. Analysts have been expecting adjusted EPS of $4.97 in 2019 and $5.26 in 2020, compared with $4.42 last year. "In the mid to long term, as the business scales and efficiencies are realized, we expect losses to decline and returns to improve," the company said in presentation materials.

On the conference call, company officials were asked why Walmart didn't just deploy capital to strengthen its core business in the U.S. CEO Doug McMillon said that if the company had been looking out only three to five years, it might have done just that. But longer term, there just aren't any other growth opportunities in retail worldwide that match the scale of this one.

With Walmart coping with the threat of Amazon, today's move makes a lot of sense for the long term, but at the cost of a huge price tag and potentially flat earnings for years.

Twilio crushes expectations again

Shares of cloud-based communications software company Twilio soared 18.2% after the company announced first-quarter results that blew away expectations and its previous guidance. Revenue grew 48% to $129.1 million, far exceeded the top end of its guidance of $117 million. Non-GAAP loss per share was $0.04, compared with guidance for a loss of $0.07 to $0.06.

The company added over 5,000 new active customer accounts in the quarter to a total of 53,985, for year-over-year growth of 33%. Base revenue, a measure that excludes some large accounts that have not signed 12-month contracts, grew 46%, or 61% excluding the loss of sales to Uber.

Looking forward, the company raised its full-year revenue guidance from a range of $506 million-$514 million to $538 million-$544 million. For Q2, Twilio expects revenue of $129 million to $131 million, while analysts had been expecting $123 million.

"We are honored that a growing list of companies around the world are placing their trust in Twilio," said CEO Jeff Lawson in the press release. "Our first quarter results exhibited broad-based strength across multiple areas of our business, especially with continued expansion with existing customers." 

Twilio's business seems to be firing on all cylinders, and after the company's second blow-out quarter this year, investors were snapping up the shares.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.