Einhorn closed winning short bet on JC Penney in Q2

David Einhorn
Peter Foley | Bloomberg | Getty Images
David Einhorn

Hedge fund manager David Einhorn closed a bet against ailing retailer J.C. Penney and a long position in Microsoft in the second quarter, according to a note to investors in his Greenlight Capital.

Einhorn said the short bet against J.C. Penney was the $8 billion firm's "most profitable short of 2012." When a hedge fund manager is short a stock he believes the value of the shares will fall. If he is long, he believes the stock will rise in value.

"Though the retailer was poorly positioned, the shares rocketed in early 2012 based on overhyped promises put forth by a highly promotional CEO," Einhorn said in the quarterly note, dated July 26. "We doubted the new strategy would succeed. We covered when the board fired the CEO before he could turn the company into a penny stock."

(Read more: Some of JC Penney's big sales are misleading, say employees)

Greenlight also closed a long position in Microsoft.

"Windows 8 appears to be a flop, and a decade of mismanagement has put Microsoft at risk of becoming a shrinking company," the letter said.

Greenlight gained 1.2 percent net of fees in the second quarter, bringing yearly gains to 7.1 percent, Einhorn's note said.

At quarter's end, Greenlight's largest disclosed long positions included Apple, General Motors, gold and Marvell Technology Group.

(Read More: Bear market in gold pummels Einhorn's Greenlight fund)

Einhorn did not elaborate about the firm's bet on gold. Greenlight's offshore gold fund fell 11.8 percent in June, bringing year-to-date losses in the fund to 20 percent, Reuters has reported.

—By Reuters