This Bot Analyzes Trump’s Tweets About Brands, Then Shorts Their Stocks

All profits benefit the ASPCA

For better or worse, brands are trying to stay out of Trump's tweets. When the president criticized General Motors for making Cruze models in Mexico on Twitter earlier this month, the brand's stock fell 0.7 percent. Shares of Boeing similarly dropped by 1.4 percent after Trump complained about the cost of building a new Air Force One in December.

After noticing a pattern between Trump's tweets and immediate stock drops, Austin, Texas-based digital shop T3 built a bot dubbed the "Trump and Dump" that scrapes Trump's tweets for mentions of publicly-traded companies. Each tweet is then scrubbed with a sentiment analysis to figure out if it is positive or negative. As soon as a tweet is deemed negative—which the shop claims takes less than 20 milliseconds—the bot automatically shorts the discussed company's stock.

The bot pulls in data from Twitter's API, sentiment info from Indico, Clearbit's stats on stock tickers and numbers from Google Finance while the trade is made using E*Trade.

"The unpredictability of it created a real opportunity," notes the agency.

Using the bot, T3 invested and then subsequently sold stock of Toyota after Trump recently threatened to give the automaker a "big border tax" if it opened a plant in Mexico, causing a 0.7 percent dip.

The bot then automatically pings a notification to the investor—T3 in this case—via Slack and the profit is donated to the American Society for the Prevention of Cruelty to Animals (ASPCA). T3 declined to say how much its donation was worth but the agency says it plans to use the technology in the future and will short the stock of any brand Trump tweets about.

"We've been using artificial intelligence to build bots, monitor social media experiences and engineer engaging applications," said Ben Gaddis, T3's president. "This project seemed like a natural progression—and who doesn't love puppies?"

The YouTube video below explains the process and the bot's algorithms a bit more.