U.S. equity markets wrapped up the last day of a downbeat third quarter on a high note as the major averages closed near session highs.

 The Dow Jones Industrial Average was up 229 points, or 1.43% to 16279. The S&P 500 rose 35 points, or 1.88% to 1919, while the Nasdaq Composite jumped 102 points, or 2.28 % to 4620.

Consumer discretionary and energy led all 10 S&P 500 sectors in advancement on the session.

Today’s markets

The final day of the quarter was a busy one on Wall Street with no shortage of economic data to digest, or Fed speak to parse.

Despite the upbeat picture on the session, the major averages booked a hefty drop for the quarter, and were still rooted in contraction territory. The Dow and Nasdaq capped the quarter down more than 7%, while the S&P 500 ended 3Q down 6.9%.

Global crude oil prices were down four of the last five quarters as U.S. crude shed 8.35% during the last three months, while Brent, the international benchmark dropped 10% during the period. On the session, U.S. crude declined 0.31% to $45.09 a barrel, while Brent shed 0.29% to $48.97 a barrel.

Meanwhile, the energy sector plunged 18% for the quarter.

Elsewhere in commodities, metals were mixed. Gold, down for five-consecutive quarters, declined 1.03% to $1,115 a troy ounce. Silver was down two-straight quarters, and on the session slid 0.38% to $14.45 a pound. Copper snapped a four-month losing streak in September, but is still lower for five-consecutive quarter – on the session, it jumped 4.08% to $2.35 a pound.

The best performing sector for the third quarter was utilities, which was the only one of the S&P 500 sectors in positive territory, ending the last three months up 4.39%.

Peter Kenny, an independent equity market strategist, said in a note that as investors come to terms with rounding out a market with the worst quarterly performance in nearly four years, there are some bright spots to focus on for the final three months of the year.

“The impact of crude’s collapse should reach its climax with Q3 earnings season in as far as S&P 500 earnings are concerned. China’s stock market selloff appears to have modulated. The eurozone appears poised for some positive, though modest economic expansion. U.S. employment gains, consumer confidence, home prices, and GDP all speak to an economy that has thus far weathered the global economic storm,” he said.

Still, to put the past year in perspective, in a note to clients on Tuesday, Goldman Sachs (GS) said while it has set its downwardly-revised S&P 500 price target at 2000, the rise would still rank the market among the weakest post-correction recoveries since 1980.

“A year-end level of 2000 would equate to just a 7% rebound from trough, weaker than 13 of 14 recoveries and roughly in line with the recovery in October 1999,” the note read.

Bruce Bittles, chief investment strategist for Baird was skeptical about whether the market can sustain that kind of momentum before the year is up.

“November, December and January tend to be the strongest months of the year – it would be encouraging to see a year-end rally, but we’ll have to see the broader market, which has led the declines since the start of the year, turn around. If it does, then the market has a good chance of getting back to the starting gate of around the 2050s on the S&P,” he said.

As traders looked ahead to the all-important September jobs report due out on Friday, the economic calendar was set Wednesday with private-sector employment data from payroll processor ADP. Private payrolls grew by 200,000 jobs during September, more than the 194,000 economists expected. Meanwhile, the Institute for Supply Management-Chicago reported the Midwest manufacturing sector slid back into contraction territory for the first time since June. The ISM-Chicago gauge fell to 48.7 in September from 54.4 in August. The Street expected a shallower fall to 53.

Elsewhere, New York Fed President and FOMC Vice Chairman William Dudley spoke about market liquidity in remarks at the Securities Industry and Financial Markets Association’s (SIFMA) liquidity forum in New York. Dudley dismissed concerns that bond-market liquidity has disintegrated amid regulatory reforms, but said he has his eye on high-frequency trading.

Fed Chief Janet Yellen followed her second in command later in the day when she delievered remarks at the St. Louis Federal Reserve’s community banking conference. Much to the market’s chagrin, Yellen did not address monetary policy, or give any additional hints as to when the central bank might begin to hike rates.

As for the Fed’s effect on the market this quarter, Bittles said it’s been less than stellar.

“I think they are really complicit in this poor action in the market this year due to the uncertainty they’ve been signaling. They don’t know what to do. If they don’t raise rates this year, their credibility will be hurt…whether the Fed will gamble this year is anyone’s guess,” he said.

Looking ahead to the next quarter, he expects consumer staples and consumer discretionary sectors to outperform, however, the looming interest-rate increase on the horizon could complicate matters.

“The economy is split: Industrials are doing poorly because of the strong dollar and weak global demand. The service sector is better because the consumer has more fire power and because energy costs have plunged and the labor market is reasonably strong,” Bittles said.

The yield on the benchmark 10-year U.S. Treasury bond was up 0.009 percentage point to 2.061%. The yield is down six of the last seven quarters, and during the last three months, saw the biggest decline since December of last year.

In currencies, the U.S. dollar declined against a basket of global notes, while the euro declined 0.64% against the greenback.

It wasn’t all about the markets on Wall Street Wednesday.  The looming threat of a government shutdown just after midnight hung in the back of the nation’s collective mind. At the center of the controversy this time is funding to Planned Parenthood, a women’s health group that found itself amid a fresh wave of controversy over the summer when videos showed it allegedly sold fetal tissue for profit.

Despite the brinksmanship, a bill that does not de-fund the organization is largely expected to pass both chambers of Congress, and make its way to the president’s desk by the 11:59:59 p.m. deadline.

Elsewhere in the world, European equity markets were mostly higher. The Euro Stoxx 50, which tracks large-cap companies in the eurozone, rose 2.34%. The German Dax jumped 2.22% while the French CAC 40 climbed 2.57%, and the UK’s FTSE 100 rose 2.58%.

In Asia, China’s Shanghai Composite rose 0.48%, while Hong Kong’s Hang Seng jumped 1.41% and Japan’s Nikkei climbed 2.54%.