Recent stock market volatility has had at least one beneficial effect on the retail sector—it’s spurred investment in some publicly-traded retail chains.

Amid the brutal selling, two large national retailers—department store JC Penney and bookseller Barnes & Noble—reached deals to receive sizable equity infusions. While driven by the fact that the shares for each firm were trading at deep discounts, the moves also illustrate investors’ faith in the long-term prospects for the two chains.

On Friday, Bill Ackman-led hedge fund Pershing Square Capital got approval from JC Penney Co.’s board of directors to up its stake in the retailer from its current 16.5 percent. Pershing Square will make the investment through a “synthetic long position” to make its exposure equivalent to 26.1 percent. A synthetic long position typically refers to a derivative contract in which the investor receives cash payments if a company’s shares rise. Pershing actually reduced its voting rights to 15 percent of shares outstanding.

JC Penney has a restriction in place preventing shareholders with more than 10 percent of its stock to buy additional common shares without its board's approval.

The news about Pershing’s investment in JC Penney came a day after media conglomerate Liberty Media Corp. signed a deal to buy a 16.6 percent stake in bookseller Barnes & Noble for $204 million. Liberty’s investment will be made through the purchase of convertible preferred shares equal to about 12 million common shares or 17 percent of Barnes & Noble stock. The deal values Barnes & Noble shares at $17 apiece.

Barnes & Noble has been looking for a buyer since last summer, and Liberty Media has been the only one to make a bid for the retailer this spring, valuing Barnes & Noble’s stock at $17 per share in May and offering to take a 70 percent stake in the retailer. It has since abandoned the ambition to buy the bookseller outright, opting instead for the smaller stake.

The switch to a smaller investment likely reflects Liberty’s desire to limit its risk in view of the challenges the book sector faces from the popularity of digital e-readers, says Howard Davidowitz, chairman of Davidowitz & Associates Inc., a New York City-based retail consulting and investment banking firm. The fact that Liberty Media decided to take a stake in Barnes & Noble at all, however, is a strong indication it believes the retailer will survive, and maybe even thrive, in the long-term.

“When Borders’ going-out-of-business phase is over, that leaves Barnes & Noble as the single book superstore left,” Davidowitz says. “It’s sort of like what happened with Best Buy when Circuit City and its other competitors left. Best Buy had a couple of very good years after that. If you are an investor, that’s very significant.”

A somewhat similar sentiment could be glanced from Pershing Square’s investment in JC Penney, according to Paul Swinand, the analyst who follows the department store for Morningstar. Since Bill Ackman now sits on JC Penney’s board of directors, he should be privy to sales and foot traffic information the company doesn’t not release publicly. If he’s willing to invest more of Pershing’s money in the chain, it likely means he’s encouraged by the numbers.

“He’s an insider and he’s thinking that the market is overreacting,” Swinand says.

As of noon Tuesday, JC Penney’s stock was trading at approximately $25.43 per share, roughly 38 percent off its 52-week peak of $41 per share.

Barnes & Noble’s stock was trading at $10.72 per share, 49 percent down from its 52-week peak of $21.06.

Lame ducks?

Both Barnes & Noble and JC Penney have faced issues recently, primarily because of increased competition in their respective retail sectors. Some market insiders have questioned whether Barnes & Noble can withstand the onslaught of digital bookselling, while JC Penney has been delivering a less than stellar performance in a sector teeming with chains catering to consumers in every income bracket. Year-to-date in 2011, the chain’s same-store sales rose 2.8 percent, compared to the sector average of 4.1 percent, according to ICSC.

Barnes & Noble, meanwhile, reported that its same-store sales rose only 0.7 percent in fiscal 2011, ended Apr. 30, the most recent period for which sales numbers are available. Most of the increase was driven by the sale of its digital products.

“We still believe Barnes & Noble faces several headwinds in its brick-and-mortar segment… as well as its digital push, as it competes with the likes of megacap companies like Apple and Amazon,” wrote Morningstar analyst Peter Wahlstrom in an Aug. 19 note. “We still believe that it will take another year or so for the firm to return to profitability, which is likely to dissuade investors.”

Nevertheless, both retailers have taken significant steps to improve their standing. Barnes & Noble’s Nook e-reader has been among the most popular e-readers available. In July, Consumer Reports declared the Nook Simple Touch Reader the best e-reader on the market, marking the first time the Nook beat out Amazon’s Kindle. That should make it much easier for Barnes & Noble to deal with changes in the bookselling industry. One of the reasons Borders has been forced out of the market has been its slow move to adapt the online and mobile sales channels.

JC Penney, meanwhile, made a major bet on Apple’s head of retail Ron Johnson. Johnson, who helped make the Apple stores among the most profitable in the retail universe, will join JC Penney this November as CEO. This appointment, coupled with the chain’s popularity with middle-income consumers, makes it an attractive long-term bet, according to Jeff Green, president of Jeff Green Partners, a Phoenix, Ariz.-based retail real estate consulting firm.

Real estate play?

JC Penney’s real estate holdings also remain quite attractive and may offer Pershing Square an additional incentive to invest, according to Davidowitz. Ackman is well-known for his interest in retail real estate, from his stake in General Growth Properties to his past efforts to spin Target stores into a REIT. As of January, JC Penney operated 1,106 department stores in 49 states and Puerto Rico, primarily at regional malls. The chain owned 426 of the stores directly.

“The department store boxes in malls have proven to be fairly valuable, which was not expected,” notes Green. “But then [we saw] Target and Costco taking over some of these boxes.”

Liberty Media, on the other hand, would have a tough time making a profit on Barnes & Noble’s real estate holdings. Today, the retail market remains oversaturated with empty big boxes. In fact, the size of Barnes & Noble’s boxes has been a hindrance to the chain itself, and it might be forced to downsize its stores when possible, says Davidowitz.

As of April, Barnes & Noble operated 1,341 stores in 50 states, 705 of them in the traditional big-box format. The stores average 26,000 square feet and all but one of them are leased.

“It’s very hard, when demand is down, to maintain these big stores,” Davidowitz says. “I think they are going to close more stores, but it will be part of a process, not a panic.”