As Barack Obama winds down his time in the White House, his administration is presiding at a time when the U.S. stock market is engaged in the second-longest bull run on record.
Whether the president deserves credit for that surge is a view that likely depends on one's politics, but there's no arguing with the numbers: Since Obama was inaugurated as the nation's 44th president on January 20, 2009, the S&P 500 (SPX) is up 14 percent, or 16.6 percent factoring in total annualized returns. That's not too shabby given that the annualized average going back to 1926 is just over 10 percent. The performance is even more impressive considering the U.S. economy, gutted by the housing bust, was reeling when Obama took office.
"Just looking at his reign, for good or bad -- the numbers are positive," said Howard Silverblatt, senior index analyst at S&P Dow Jones Indices. "Someone could legitimately say it started at a low part, but others could say he managed it up."
Indeed, as Obama was moving into the Oval Office the U.S. was still deep in the grips of the recession, which officially started in December of 2007. Gross domestic product -- the broadest measure of the economy's strength -- fell a whopping 5.4 percent in the first three months of his administration. Yet by March 9, 2009, stocks had already leaped 20 percent from the previous low, the standard definition of a bull market, and would go on to climb from there.
"So his starting point was a difficult one," said Jim Russell, principal and portfolio manager at Bahl & Gaynor.
The economic recovery came in the wake of unprecedented stimulus from the Federal Reserve, which continues to hold bank borrowing costs near record lows, monetary policy that is evident today in Wall Street's performance. "Interest rates and the recovery in job growth and incomes, which has occurred slowly, is apparent in the returns," said Russell.
Of the S&P 500's 10 major sectors, consumer discretionary has fared the best during Obama's time in the oval office, climbing 21 percent. Of the index's top 20 performers since Obama's 2009 swearing-in, half are providers of consumer products viewed as discretionary, starting with auto parts supplier Delphi Automotive and including internet TV company Netflix, apparel maker Under Armour, online retailer Amazon.com and coffee purveyor Starbucks.
"They did the best, but they were hurt the most," said Silverblatt of the sector that includes companies offering products and services that consumers can do without, and apparently did, during the recession. "You'll notice staples did not move so much," Silverblatt added of the sector that offers more basic necessities, and advanced 13 percent during Obama's time in the White House.
"Consumer discretionary has done the best because of the gradual job improvement since he took office, as well as the low interest-rate environment which has permeated since he took office," said Russell. "When rates are low, people can refinance their homes, they can buy new homes, which has occurred in gobs, and they can buy cars."
Conversely, the energy sector has gained the least during Obama's two terms, up only 4.9 percent. Of the S&P 500's worst 20 performers since Obama took the helm, nine stocks, or nearly half, fall in the energy category. The include oil-and-gas drillers Transocean and Diamond Offshore Drilling, along with exploration and production companies Chesapeake Energy and Southwestern Energy.
"Energy hasn't done too well," said Silverblatt, who points out that the numbers would have been a lot better back in June 2014, when oil was well over $100.
In Russell's view, the lack of return from the energy sector can be chalked up in large part to OPEC pushing down the price of crude oil by "keeping production high while trying to get frackers out of the way." In addition, he points to regulation to curb carbon emissions and "the pipeline that wasn't built" -- a reference to the Keystone Pipeline XL -- as factors weighing on the sector.
"This is a very aging bull -- it may be charging at this point, but the big question on the street is whether it's running out of breath," Silverblatt said. "The  election could make it, or take it away," he added of the potential impact of the November balloting that will determine Obama's successor.
Here's a rundown of the the best- and worst-performing equities ranked by how much each of those stocks have risen while Obama has been president:
S&P 500's 12 best-performing stocks between January 20, 2009-July 21, 2016
1. Delphi Automotive (DLPH) -- autoparts maker, up nearly 8,600 percent
2. General Growth Properties (GGP) -- real estate investment trust (up 2,700 percent)
3. Regeneron Pharmaceuticals (REGN) -- drugmaker (up 2,400 percent)
4. Netflix (NFLX) -- online media provider (up 1,900 percent)
5. Priceline.com (PCLN) -- online travel company (up 1,900 percent)
6. Under Armour (UA) -- apparel/footwear maker (up nearly 1,700 percent)
7. Skyworks Solutions (SWKS) -- semiconductor maker (up 1,640 percent)
8. Amazon.com (AMZN) -- ecommerce company (up 1,440 percent)
9. Qorvo (QRVO) -- provider of radio frequency technology (up nearly 1,400 percent)
10. United Rentals (URI) -- equipment rental company (up 1,240 percent)
11. Starbucks (SBUX) -- coffee chain (up 1,200 percent)
12. Wyndham Worldwide (WYN) -- hotel operator (up 1,160 percent)
S&P 500's 12 worst-performing stocks between January 20, 2009-July 21, 2016
1. Transocean (RIG) -- energy exploration company (down 74 percent)
2. First Solar (FSLR) -- solar equipment maker (down 65 percent)
3. Chesapeake Energy (CHK) -- oil/gas exploration (down 64 percent)
4. HP (HPQ) -- computer maker (down 58 percent)
5. Diamond Offshore Drilling (DO) -- energy exploration (down 57 percent)
6. Southwestern Energy (SWN) -- natural gas/oil exploration (down 51 percent)
7. Marathon Oil (MRO) -- exploration/development company (down 46 percent)
8. Staples (SPLS) -- office supply retailer (down 45 percent)
9. NRG Energy (NRG) -- provider of power generation services (down 35 percent)
10. Frontier Communications (FTR) -- telecom services seller (down 33 percent)
11. Murphy Oil (MUR) -- oil/gas exploration (down 32 percent)
12. Devon Energy (DVN) -- oil/gas exploration (down 32 percent)