NEW YORK – J.C. Penney Co. CEO Ron Johnson hasn’t run out of magic yet, as far as Wall Street is concerned.

The former Apple executive’s soothing words drove the chain’s stock higher even after the company offered up grisly details Friday of a terrible second quarter.

The midpriced department store chain reported a bigger-than-expected loss and plummeting sales. Shoppers are still not buying into a bold new pricing strategy. Penney even withdrew its full-year profit guidance.

The bleak performance marked the second straight quarter of severe sales declines since Penney got rid of most steep temporary discounts in favor of everyday lower prices. The report confirmed it’s going to be a hard sell to shoppers who are used to big sales and coupons.

Yet, after feeling a bit queasy in premarket trading, investors pushed up Penney’s stock price by as much as 9 percent after Johnson reassured investors on a 90-minute conference call.

Shares closed up almost 6 percent at $23.40. The gains show Wall Street wants to believe the mastermind behind Apple’s stores and Target’s cheap-chic strategy can deliver.

“The more he sells the hope, the more investors are buying into it,” said Brian Sozzi, chief equities analyst for research firm NBG Productions.

Johnson remained confident and calm as he vowed he was sticking to the plan. He shared more details of his vision for creating a new breed of specialty department stores and said that the latest fixes to simplify the pricing plan on Aug. 1 are resonating with customers.

He also allayed concerns about how much cash the company has.

While admitting to mistakes in pricing and marketing, Johnson told investors, “I am completely convinced that our transformation is on track.”

Under Johnson’s stewardship, Penney is changing everything from the items it stocks to store design. But the riskiest move has been its pricing. The goal is to offer consumers more predictability so they will visit more often.

Penney’s stock is beaten up — still down by nearly half since its peak above $42 in the afterglow of Johnson’s hiring. And business can’t get any worse, said Ron Friedman, head of the retail and consumer products group at accounting firm Marcum LLP.

“People are optimistic. They really believe in him,” Friedman said.

Back in January, Johnson told investors how he faced lots of critics on Wall Street in 2001 when he launched the first Apple store. “There wasn’t one positive believer that thought an Apple retail store would work.” Of course, they were wrong.

Johnson’s task at Penney appears more challenging.

In May, Penney’s stock plunged 20 percent, its biggest one-day decline in four decades, after the retailer posted a larger-than expected first-quarter loss and a 20.1 percent drop in revenue. Customer traffic was down 10 percent.

Things got even worse in the second quarter as Penney backpedaled a bit on discounts, withdrew TV ads and canceled some print ads in mid-June as it figured out its new game plan.

The department store lost $147 million, or 67 cents per share, in the quarter ended July 28. That compares with net income of $14 million, or 7 cents per share, a year ago.

Revenue tumbled almost 23 percent to $3.02 billion. Revenue at stores open at least a year fell 21.7 percent. Customer counts fell 12 percent.