Best Buy’s shares are flying high heading into Black Friday, harking back to a time in the mid-2000s when the retailer was still opening new stores and was seen as more of a curiosity than a major threat.

And smiling — at least, for now — is Best Buy CEO Hubert Joly, who delights in proving wrong the naysayers who thought the online juggernaut would put Best Buy out of business. To the contrary, he says there’s room in the market for both to win.

“Amazon is raising the bar,” said Joly. “We are clearly raising the bar. And I think it’s going to become harder and harder for others to compete — because the economics are very tough. You need to be really good at this.”

This will be Joly’s fifth holiday season as CEO of the electronics chain, overseeing one of the biggest turnaround stories in retail. During an interview at Best Buy’s Richfield headquarters, Joly discussed a wide range of topics from competition such as Amazon and holiday strategies to why its stores will be open on Thanksgiving.

When he joined Best Buy in 2012, Joly decided to match the online prices of Amazon and other major competitors. He also challenged the belief that its 1,400 stores were a liability, instead making them bigger destinations by adding mini-shops from vendors such as Samsung and Sony and emphasizing the expertise of its “blue shirt” employees and the Geek Squad services.

The chain also has upgraded its digital channels and sped up its delivery, now getting more packages to customers’ doorsteps within two days.

Of course, Amazon hasn’t been sitting still, either. The online giant has extended its reach by adding millions more households to its Prime membership program through enhanced services such as new streaming content and two-hour delivery of everything from restaurant food to alcohol to last-minute holiday gifts through its growing Prime Now network.

Still, Best Buy’s efforts appear to be paying off. Its online sales have jumped 24 percent in each of the last three quarters and now account for about 11 percent of its overall sales.

Amazon and Best Buy currently control about 25 percent of the U.S. electronics market, Joly said. Down the road, he expects that other smaller players might bow out or de-emphasize electronics among the various categories they sell.

Said Peter Keith, an analyst with Piper Jaffray: “My view is they have eliminated the online threat of Amazon. It’s still there — but they’re not losing share to Amazon anymore.”

Aside from Amazon, the other pressing question about Best Buy’s future is whether there’s enough growth in the notoriously cyclical electronics market to sustain it. While some are still circumspect, Joly is feeling more upbeat amid strong sales in 4K TVs as well as emerging categories such as drones, connected home products and virtual reality.

At the same time, Best Buy is navigating unanticipated roadblocks such as the massive recall of the Samsung Galaxy Note 7, which Best Buy told investors last week would likely lead to a $200 million hit in sales over the holidays. Still, the retailer’s stock shot up to around $45 a share after investors were impressed by Best Buy’s profit forecast of sales in the range of up 1 percent to down 1 percent.

As it gears up for the holidays, Best Buy has been rolling out virtual reality departments to many of its stores. It has beefed up staffing in such key areas as its online pickup counters. It’s again offering free shipping through the holidays.

Best Buy also is arming employees with tablets in about 100 stores so they can look up products for customers and even complete the sale on them.

‘Nobody forces them to shop’

While Black Friday has become diluted in recent years by earlier sales in November, Joly said Best Buy’s Black Friday, which begins on Thanksgiving, is still its biggest event of the year in terms of sales and traffic.

As it has the last few years, Best Buy will open most of its stores at 5 p.m. on Thanksgiving Day. The hot-button topic of whether retailers should open on the holiday picked up some steam this year when some notable malls and retailers such as Mall of America and electronics chain hhgregg decided to stay closed on Thanksgiving this year.

“There are retailers for whom holiday shopping is not a very big deal,” Joly said of stores or malls closed on Thanksgiving. “You have other retailers, frankly, who don’t have the economics. … They are probably losing money, so for them it’s a cost-saving measure” to close this year.

Electronics, he noted, is one of the biggest holiday shopping categories. And with millions of shoppers showing up to its stores on Thanksgiving, Best Buy has the momentum and critical mass for it to be a profitable day, he said.

“We’re in the customer happiness business, right?” he said. “Customers told us, because they vote with their feet, that they’re interested in shopping with us [on the holiday]. There’s nobody that forces them to shop on Thanksgiving, right?”

In the past few years, Best Buy has been working to reduce turnover among front-line associates and store managers — an effort Joly thinks will pay off this season in terms of more knowledgeable and engaged employees. As he started talking about the topic, he was interrupted by some barking in the corner of his office. His eyes lit up.

“Hey Chip!” Joly called out merrily to the robotic dog, which Best Buy sells, of course. He playfully motioned a visitor over to show off how it responds to commands. “Hey Chip, kneel down. … Hey Chip, let’s dance.”

Sitting back down, he laughed about the distraction: “Boys with toys, right?”

But being an avid user and evangelist for technology is also part of the job — and one that Joly takes seriously.

He bought a drone last year and plans to buy another this holiday. His house is filled with several Google Home devices, the tech giant’s version of the voice-activated-and-responding Amazon Echo. He has an Echo, too, in his kitchen and is a Prime member himself.

“But Alexa and I are not really on speaking terms anymore,” he quipped.

In addition to all of the latest tech he surrounds himself with, Joly has a decidedly older-school contraption in his office: a Magic 8 Ball. This particular one doesn’t work so well, he said. But the one it replaced — a gift — was always right on the mark. Still, he agreed to give it a whirl.

Will Best Buy win the holidays? he asked it.

“Yes — actually it says yes,” he said. “So we’ll see. We’re going to determine the outcome but it’s in the making.”

Then, taking a more modern spin, he spoke to his phone: “OK, Google, will Best Buy win the holidays?”

He shrugged and laughed at the list of search results that came back, including the chain’s holiday commercials from last year.

The real answer will be known soon enough.