Trump Twitter Bot Monitors Market And Donates Profits to Planned Parenthood

trump twitter bot markets donations
The Twitter Inc. logo is shown with the U.S. flag during the company's initial public offering on the floor of the New York Stock Exchange in New York, November 7, 2013. REUTERS/Lucas Jackson/File Photo

Donald Trump's tweets tend to follow Newton's third law: that every action has an equal and opposite reaction. So when the president publicly praises or criticizes a company on Twitter, the stock market reacts accordingly.

In January, it took less than 140 characters to wipe $1.2 billion from Toyota's value, while a tweet about Boeing's "out of control" government contract costs caused the airplane manufacturer's share price to drop by around $1 billion.

Toyota Motor said will build a new plant in Baja, Mexico, to build Corolla cars for U.S. NO WAY! Build plant in U.S. or pay big border tax.

— Donald J. Trump (@realDonaldTrump) January 5, 2017

This phenomenon has inspired a Google engineer to exploit Trump's "emotional incontinence" to effect some positive change. Max Braun, whose day job is developing robots at Google X, decided to write some computer code capable of catching every time Trump mentions a publicly traded company on Twitter. After automatically assessing whether it is positive or negative, the bot then autonomously trades stock in that company.

donald trump twitter bot donation planned parenthood
When Donald Trump tweeted about Toyota in January, the car maker's stock price tanked. Max Braun

"If you've been following the news about Donald Trump's tweets, you know that they can move markets," Braun tells Newsweek. "I've been playing with the idea of writing a trading bot based on this for a while. The outcome is @Trump2Cash, which notifies you about when he tweets. It can even automatically trade stocks for you."

Braun has made the code open source so that anyone can make use of it, but for his own fund he is donating the profits in equal parts to the American Civil Liberties Union, the National Resources Defense Council, and Planned Parenthood—three institutions Braun believes are vital in the age of Trump.

The theory, Braun says, is that markets are unpredictable and Trump is unpredictable. But when you put the two together, a pattern begins to emerge. With a simulated fund of $100,000, the algorithm currently has an annualized return of about 59 percent since its inception, and it has earned more than $7,000 since December 6.

Previous side projects Braun has been involved with include a smart mirror that ran Google's Android operating system to allow users to read the news and check the weather while brushing their teeth.