The going hasn't been great for David Einhorn lately.

The Greenlight Capital founder wrote in his second-quarter letter to investors, reported by ValueWalk, that his funds lost 2.6% during the period, bringing the year-to-date return to 0.4%. Most of the losses, he noted, came from Greenlight's shorts -- namely, an undisclosed fracking short and Amazon  (AMZN - Get Report) . 

In the letter, Einhorn discussed the Brexit, the Federal Reserve and government bonds. He noted that gold and Consol Energy  (CNX - Get Report) have been his firm's biggest winners as of late, while Apple  (AAPL - Get Report) had been one of its biggest losers.

The billionaire also spent much of the letter discussing the fund's exits. Last quarter, Greenlight sold off nine long positions, according to its most recent 13F filing, corresponding to June 30. Here's what the firm unloaded.

Macy's

Einhorn sold off all of his shares of Macy's (M - Get Report) last quarter.

He addressed the exit in his second-quarter letter to Greenlight Capital investors, noting that the fund sold Macy's at a loss after the company announced a significant reduction in full-year guidance. "This announcement invalidated our thesis that 2016 would benefit from easy comparisons later in the year," he wrote.

Macy's is an omnichannel retailer headquartered in Cincinnati, Ohio. It has a $12.1 billion market cap and trades at a P/E of 12.99.

EMC

Einhorn unloaded his entire stake in EMC  (EMC last quarter.

EMC supports the businesses and service providers to transform information technology operations to an as-a-service model. Its operating segments are EMC Information Infrastructure, Pivotal and VMware Virtual Infrastructure. It has a $56 billion market cap and trades at a P/E of 26.76.

Oil States International

Einhorn sold off his position in Oil States International (OIS - Get Report) last quarter.

"The stock fell sharply during the oil commodity rout and then subsequently bounced on an anticipated recovery," he wrote of the move. "We sold rather than waiting to see if the recovery pans out."

Oil States International provides products and services to oil and natural gas companies. It operates in oil- and natural-gas-producing regions, including onshore and offshore U.S., Canada, West Africa, North Sea, South America and Southeast and Central Asia. It has a $1.7 billion market cap.

American Capital Agency

American Capital Agency  (AGNC - Get Report) is another stock Einhorn unloaded during the second quarter. In his investor letter, the billionaire said the sale was made for a small gain after the company announced the acquisition of its external manager, American Capital Mortgage Management. "Strangely, the market treated this bad news as good news, so we chose to exit," Einhorn wrote.

American Capital Agency is a real estate investment trust that invests exclusively in residential mortgage pass-through securities and collateralized mortgage obligations on a leveraged basis. It has a $6.6 billion market cap.

Allergan

Einhorn cashed out of Allergan (AGN - Get Report) last quarter.

Allergan is a specialty pharmaceutical company that develops, manufactures and distributes generic, brand and biosimilar products. It has a $100.4 billion market cap and trades at a P/E of 20.50. Allergan is a holding in Jim Cramer's Action Alerts PLUS charitable portfolio. 

SunEdison

Einhorn exited SunEdison (SUNEQ last quarter. The company filed for Chapter 11 bankruptcy protection in April under mounting debt.

SunEdison is a developer and seller of photovoltaic energy solutions and owner and operator of clean power generation assets. It has a $15.9 million market cap.

Ingram Micro

Einhorn sold off all of his shares of Ingram Micro (IM last quarter. In his second-quarter letter to investors, he described it as a "small position that earned a good return" and noted that it is set to be acquired by Tianjin Tianhai.

Ingram Micro is engaged in the distribution of IT products, supply chain services and mobile device lifecycle services. It has a $5.3 billion market cap and trades at a P/E of 17.71.

Globalstar

Einhorn's Greenlight exited Globalstar (GSAT - Get Report) last quarter.

Globalstar is a provider of mobile satellite services, including voice and data communications services, through its satellite network. It has a $1.4 billion market cap.

Baxter International

Einhorn sold Baxter International (BAX - Get Report) at a gain "when the shares reached our view of fair value," he wrote.

Baxter, a health care company, develops, manufactures and markets products that save and sustain the lives of people with immune disorders, infectious diseases, kidney disease, trauma and other chronic conditions. It has a $26.1 billion market cap and trades at a P/E of 5.53.