This Google X engineer’s open-source bot turns Trump’s tweets into hard cash

donald trump, reddit

When Donald Trump tweets, the market responds. Wall Street has been on to this fact for a while now, but now, thanks to Google X robot engineer Max Braun, so can you.

In a post on Medium Braun writes “Our new President really likes to use Twitter. He uses it to express strong opinions about all sorts of things. Occasionally, those opinions are targeted at publicly traded companies. You see where this is going.”

Yes we do.

And so did he. As Braun put it: “I have a very particular set of skills, skills that allow me to have some fun with Mr. Trump’s emotional incontinence and maybe effect positive change along the way.”

He set to work, building a Twitter bot that checks the President’s twitter feed for any mentions of companies and buys stock or goes short on that company depending on the sentiment of tweet.

Credit: Max Braun/Medium
Return on fictional $100,000 fund.

According to his post, the plan actually works. His simulated fund that managed 100,000 virtual dollars saw an annualized return on investment of 59% – or about $7,000 if you’re not into calculating percentages.

The reason Braun’s plan works is probably due to automated trading on Wall Street. The LA Times reported on this phenomenon, quoting a statement by Ted Merz, Bloomberg’s global head of news product.

“The almost instantaneous movement in stock prices following some Trump tweets, most notably for Toyota, suggest to us that traders are using algorithms that execute trades immediately,” Merz said.

Credit: Max Braun/Medium
Toyota’s stock price tumble after Trump’s tweet.

Toyota’s US traded shares lost 1% of their price, equaling a $2 billion dollar loss of the companies total market value, following an angry Trump tweet, and the reaction to that on Wall Street.

In this sense, Braun’s bot doesn’t differ that much from the automated trading done by professionals.

What does differ is where the money he makes ends up. Braun writes that the profits go in equal parts to the American Civil Liberties Union, the National Resources Defense Council, and Planned Parenthood.

He also made the code available on GitHub for anyone to fork or add suggestions, so feel free to grab the code and with a bit of luck, make some money – that you could also donate.

One suggestion I gleaned from the LA Times article, is that Trumps tweets don’t seem to have a lasting effect on stock prices – they usually bounce back after quickly hitting a maximum or minimum.

As James F. Peltz writes in that article: “If a stock suddenly falls in response to Trump’s comments, traders can buy the shares with the expectation they’ll soon rebound, said Zachary David, a senior analyst and automated-trading expert at the markets consultant KOR Group.”

Feel free to use that advice to improve on Brauns bot.

This Machine Turns Trump Tweets into Planned Parenthood Donations on Medium

Read next: Facebook launches new tool to find shelter and aid after an emergency

Shh. Here's some distraction

Comments