Shares of Education Realty Trust Inc. swung sharply to a gain of 1.7% in afternoon trade Wednesday, after The Wall Street Journal reported that it was in talks to be acquired by Greystar in a deal that could value the real estate investment trust at about $3.15 billion. Just prior to the WSJ report, Education Realty’s stock was down about 1.5%. Greystar has offered to buy Education Realty for $41.50 a share, the WSJ report said, which is 3.5% above Tuesday’s closing price of $40.09. The stock has closed as high as $41.50 since March 3, 2017. The WSJ report said a deal could be announced this week. Education Realty’s stock has now rallied 16.6% year to date, while the SPDR Real Estate Select Sector ETF has lost 4.3% and the S&P 500 has gained 4%.