Image source: Getty Images.

After wobbling around breakeven for most of the trading session, stocks rushed into solidly positive territory in the afternoon, and ended Wednesday with solid gains. The Dow Jones Industrial Average (^DJI 0.67%) and the S&P 500 (^GSPC 0.87%) indexes each rose by more than 0.5%.

Today's stock market:

Index

Percentage change

Point change

Dow

0.61%

110.94

S&P 500

0.53%

11.44

Source: Yahoo Finance.

Oil prices spiked higher as OPEC came closer to agreeing to lower global supply by freezing the output of its member nations. As a result, exchange-traded funds linked to oil prices had an especially good day. The leveraged Velocity Shares 3X Long Crude ETF (UWT) rose 15%. Meanwhile, comments from Federal Reserve officials indicating no fixed timetable on interest rate increases helped VanEck Vectors Gold Miners ETF (GDX -4.52%) climb by over 2%.

A few individual stocks didn't get to participate in the broader market gains, though, including Nike (NKE -0.36%) and Sonic (SONC).

Nike's cloudy future

Nike was the Dow's worst performing stock, logging a 4% drop following its quarterly earnings release. That report showed healthy growth for the sports-apparel titan, as revenue improved by 10% after adjusting for currency translations. Profits rose at a slower clip, ticking up 9%, to reach $0.73 per share.

Image source: Getty Images.

Executives were happy with both the top- and bottom-line results. "Fueled by an incredible summer of sport," CEO Mark Parker said in a press release, "Nike delivered strong global growth and led the industry through disruptive innovation."

Gross profit margin slipped by 2 percentage points, to 46% of sales. But Parker and his team explained that this was all due to temporary issues including foreign exchange rates and Nike's exiting of the golf equipment business. That profitability drop was compounded by higher spending around marketing for the Olympic games. Overall, Nike's bottom line profitability fell to 13.7% from 14% in the year-ago period.

Looking forward, the company revealed that futures orders grew by just 5%, marking a slowdown from last quarter's pace. Yet Nike's full-year sales outlook remains unchanged.

The same can't be said for profits, though. Nike lowered its gross margin forecast as it sees higher selling prices continuing to be overwhelmed by the types of short-term issues that hurt results this quarter.

Sonic's traffic decline

Sonic shares fell 7% after the restaurant chain warned that it would not meet management's top- and bottom-line goals for its fiscal fourth quarter. The nation's largest drive-in restaurant business said that comparable-store sales fell by 2% this quarter, which marked a sharp reversal from the prior quarter's 2% increase.

Sonic blamed falling customer traffic trends and a brutal overall selling environment for the downshift. "The shortfall was largely driven by lower-than-expected traffic, reflecting lower consumer spending in restaurants and continued aggressive competitive activity," CEO Cliff Hudson said in a press release. The comments helped push the wider restaurant sector lower on Wednesday.

Sonic will release its official quarterly numbers on October 24, which will show important details like restaurant-level profit margins and free cash flow. That announcement will also include the company's updated outlook for the coming fiscal year. Judging by the stock's drop, investors are bracing for that forecast to project weak growth, or even a slight comps decline ahead, as consumers appear to be scaling back on their restaurant trips.