Twitter closed up roughly 5 percent Tuesday, hitting a 3-year high, after Dow Jones Indices announced the social media company would replace Monsanto in the .

The gains pushed Twitter stock to $39.80 per share by market close, putting the stock at levels not seen since April 2015.

Another tech company, Netflix will fill the agricultural giant's place on the S&P 100. The changes will go into effect prior to market open on Thursday, June 7.

German pharmaceutical and life sciences company Bayer is wrapping up its $63 billion takeover of Monsanto. As part of the acquisition, Bayer will retire Monsanto's iconic name.

Shares of Twitter are up more than 65 percent year-to-date and just more than 118 percent year-over-year.

—CNBC's Sara Salinas contributed to this report.