Trump2cash – A stock trading bot powered by Trump tweets(github.com)
github.com
Trump2cash – A stock trading bot powered by Trump tweets
https://github.com/maxbbraun/trump2cash
157 comments
It's perfectly workable. The bot just needs to weigh its trades properly and provided the sentiment signal has any alpha, it can be combined with other analysis to run a profitable strategy.
I've seen this working and working very well (day job), although not specifically with Trump tweets.
I've seen this working and working very well (day job), although not specifically with Trump tweets.
If it works, the last thing you want to do is post it on HN, because it'll stop working once everyone starts using it. Everybody else running the bot will bid up the prices of affected stocks before you can get to it, and so by the time your bot gets around to executing its trade, you'll be buying at inflated prices and lose money as everyone else takes their profits.
Not necessarily. If you can get a bunch of unsophisticated traders on relatively high-latency connections (AKA the readers here) to execute a known strategy, you can actually make a lot of money by simply frontrunning them. :)
It's possible to profit from increased volatility without knowing the direction of the move.
http://www.investopedia.com/articles/active-trading/040515/h...
http://www.investopedia.com/articles/active-trading/040515/h...
Especially because the effect of Trump's tweets has rapidly shifted. His Boeing tweet hurt their stock price considerably. But just a few weeks later, his Nordstrom tweet helped quite a bit.
I guess you could weigh it against his favorability polling, but you're right, this is all just guesswork masquerading as science.
I guess you could weigh it against his favorability polling, but you're right, this is all just guesswork masquerading as science.
Those are two very different companies, though. It's not like the average consumer can make any sort of buying decision that will affect an aerospace company, but they can certainly patronize or boycott a department store. Plus Boeing likely does a lot of business with the federal government which Trump is now head of, while retail outlets are highly unlikely to be directly affected by anything a President does.
That's true, which means any algorithm would also have to take the nature of the company being tweeted about into consideration.
Can confirm. I've been running this bot for 8 minutes and currently have a $7.8 million short position against the fake NYT. SEE YOU IN COURT, @maxbbraun!
So, we should just invert the bots request. If Trump reacts negatively, the bot interprets that as a buy. And a positive Trump reaction should be a sell.
Now your holding lots of Nordstrom and NYT, and riding the wave up. Congrats, your going to be a millionaire!
Now your holding lots of Nordstrom and NYT, and riding the wave up. Congrats, your going to be a millionaire!
Invert references to media-related companies. And double down on references to defence contractors.
[deleted]
Instead of sentiment analysis directly maybe use a model to predict whether the stock is going to rise or fall.
[deleted]
I actually did some basic analysis of this recently - can you really make money in the stock market trading on Trump's tweets. https://medium.com/karan/can-you-really-make-money-when-real...
My answer was maybe but I'd rather not put my money at the mercy of a lunatic.
My answer was maybe but I'd rather not put my money at the mercy of a lunatic.
Your entire economic system is at the mercy of said lunatic.
Trump is a symptom not the cause. Though this symptom could be highly problematic.
Dark money influencing elections = wild man at the tiller.
Dark money influencing elections = wild man at the tiller.
Yet another thing I'd rather not have.
From the admittedly small data set of 6 tweets, it looks like the answer is "no" with one exception where the market took over an hour to react. I'm curious why the Ford lag time was so different.
Because Ford's actions had been expected/known for some time. Trump literally had nothing to do with it. You don't just spin up factories like an EC2 instance.
His other tweets regarding other companies were all future-tense, and companies he is in a position to bully. Except for Nordstrom, of course.
His other tweets regarding other companies were all future-tense, and companies he is in a position to bully. Except for Nordstrom, of course.
Your answer according to the article actually appears to be "no."
Very cool. Funds have been capitalizing on Trump's tweets since at least December (but probably November) of 2016: https://www.bloomberg.com/view/articles/2016-12-07/flash-cra...
I'd be interested in learning why TradeKing was used , as I haven't used it myself - was it for an especially solid API, or just because TradeKing is easy to get set up and doesn't require a minimum investment? If anyone wants to play around with this and has at least $10k to play with, Interactive Brokers will give you better fees.
OP, you might be interested in Quantopian's Zipline algorithmic trading library, which is also in Python: https://github.com/quantopian/zipline
Also, I feel like there should be a disclaimer that given how accessible this strategy is (both in required skill and resources) and how much attention the Trump tweets phenomenon has gotten, any alpha from this has been almost certainly lost to other firms. This is a cool project, but it's probably not actually an effective strategy anymore.
I'd be interested in learning why TradeKing was used , as I haven't used it myself - was it for an especially solid API, or just because TradeKing is easy to get set up and doesn't require a minimum investment? If anyone wants to play around with this and has at least $10k to play with, Interactive Brokers will give you better fees.
OP, you might be interested in Quantopian's Zipline algorithmic trading library, which is also in Python: https://github.com/quantopian/zipline
Also, I feel like there should be a disclaimer that given how accessible this strategy is (both in required skill and resources) and how much attention the Trump tweets phenomenon has gotten, any alpha from this has been almost certainly lost to other firms. This is a cool project, but it's probably not actually an effective strategy anymore.
> OP, you might be interested in Quantopian's Zipline algorithmic trading library, which is also in Python: https://github.com/quantopian/zipline
Or backtrader (backtesting and live trading with Oanda and IB)
https://github.com/mementum/backtrader
Or backtrader (backtesting and live trading with Oanda and IB)
https://github.com/mementum/backtrader
Nice, now I've got something else to play with this weekend.
> If anyone wants to play around with this and has at least $10k to play with, Interactive Brokers will give you better fees.
For anyone 25 or younger who's reading this, the required minimum for you is $3k[0].
[0]: https://www.interactivebrokers.com/en/index.php?f=4969
For anyone 25 or younger who's reading this, the required minimum for you is $3k[0].
[0]: https://www.interactivebrokers.com/en/index.php?f=4969
I used to trade with Tradeking and can confirm they have a very good and well documented API, including their realtime streaming API.
another version could be to capitialize on this:
"The efficient markets hypothesis may be "the best established fact in all of social sciences," but the best established fact in all of financial markets is that, when there is news about a big famous private company going public or being acquired, the shares of a tiny obscure public company with a similar name will shoot up. I don't know what that tells you about the efficient markets hypothesis, but it happened to Nestor, Inc., and to Tweeter Home Entertainment, and to Oculus VisionTech Inc., and now it has happened to SNAP Interactive Inc.:
In what is almost surely a case of mistaken identity, investors sent shares in a little known startup called SNAP Interactive Inc., ticker STVI, surging 164 percent in the four days since Snap Inc. filed for a $3 billion initial public offering. The $69 million SNAP Interactive makes mobile dating apps, while the IPO aspirant is the parent of the popular Snapchat photo-sharing app. These stories are always less impressive when expressed in dollar terms than they are in percentages. In the four trading days since Snap Inc. filed its S-1, SNAP Interactive has traded 19,963 shares, worth less than $200,000, according to Bloomberg data. If you had a cunning plan to buy up SNAP shares and sell them for a quick profit when Snap filed to go public, it might have worked, but not in particularly huge size."
article here: https://www.bloomberg.com/view/articles/2017-02-09/quasi-ind...
"The efficient markets hypothesis may be "the best established fact in all of social sciences," but the best established fact in all of financial markets is that, when there is news about a big famous private company going public or being acquired, the shares of a tiny obscure public company with a similar name will shoot up. I don't know what that tells you about the efficient markets hypothesis, but it happened to Nestor, Inc., and to Tweeter Home Entertainment, and to Oculus VisionTech Inc., and now it has happened to SNAP Interactive Inc.:
In what is almost surely a case of mistaken identity, investors sent shares in a little known startup called SNAP Interactive Inc., ticker STVI, surging 164 percent in the four days since Snap Inc. filed for a $3 billion initial public offering. The $69 million SNAP Interactive makes mobile dating apps, while the IPO aspirant is the parent of the popular Snapchat photo-sharing app. These stories are always less impressive when expressed in dollar terms than they are in percentages. In the four trading days since Snap Inc. filed its S-1, SNAP Interactive has traded 19,963 shares, worth less than $200,000, according to Bloomberg data. If you had a cunning plan to buy up SNAP shares and sell them for a quick profit when Snap filed to go public, it might have worked, but not in particularly huge size."
article here: https://www.bloomberg.com/view/articles/2017-02-09/quasi-ind...
There was an article a while back -- https://news.ycombinator.com/item?id=1144548 -- purporting that the efficient market hypothesis is true if and only if P = NP. ... which I'd argue implies social science is overly optimistic about that hypothesis.
That also implies that if the market is very close to efficient, you need absolutely massive amounts of computational power to bring it even closer (i.e. to make money). So even if it is inefficient, that doesn't mean anyone can reasonably expect to find exploitable patterns.
Comparing the last version of STVI's Investor Relations page on archive.org [1] (May 2016 pre Snapchat company name change) to the version today [2], I'm not convinced they aren't trying to be intentionally deceptive. It almost looks like they rewrote their description to sound vaguely like Snapchat.
May 2016:
> Snap Interactive, Inc. (“SNAP”) develops, owns and operates dating applications for social networking websites and mobile platforms. SNAP’s flagship brand, FirstMet.com, is a multi-platform online dating site with a large user database of approximately 30 million users. FirstMet.com‘s mission is to improve the online dating experience of meeting new people by integrating a user’s friends and interests to enable more meaningful connections. SNAP’s newest application, The Grade, is a patent-pending mobile dating application catering to high-quality singles.
Present (emphasis mine):
> Snap Interactive, Inc. (“SNAP”) (OTCQB: STVI) develops, owns and operates real-time, rich media social networking and dating applications on desktop and mobile computing platforms. Supported by a portfolio of 25 patents, SNAP is a leader in real-time video communication, with groundbreaking products powering one of the world’s largest collections of video-based communities. Through brands such as Paltalk, FirstMet, Camfrog and Tinychat, SNAP has helped hundreds of millions of users around the world make meaningful friendships and romantic connections.
[1]: http://web.archive.org/web/20160506160057/http://www.snap-in...
[2]: http://www.snap-interactive.com/investor-relations/
May 2016:
> Snap Interactive, Inc. (“SNAP”) develops, owns and operates dating applications for social networking websites and mobile platforms. SNAP’s flagship brand, FirstMet.com, is a multi-platform online dating site with a large user database of approximately 30 million users. FirstMet.com‘s mission is to improve the online dating experience of meeting new people by integrating a user’s friends and interests to enable more meaningful connections. SNAP’s newest application, The Grade, is a patent-pending mobile dating application catering to high-quality singles.
Present (emphasis mine):
> Snap Interactive, Inc. (“SNAP”) (OTCQB: STVI) develops, owns and operates real-time, rich media social networking and dating applications on desktop and mobile computing platforms. Supported by a portfolio of 25 patents, SNAP is a leader in real-time video communication, with groundbreaking products powering one of the world’s largest collections of video-based communities. Through brands such as Paltalk, FirstMet, Camfrog and Tinychat, SNAP has helped hundreds of millions of users around the world make meaningful friendships and romantic connections.
[1]: http://web.archive.org/web/20160506160057/http://www.snap-in...
[2]: http://www.snap-interactive.com/investor-relations/
The example that is cited in my family is the Seaboard Air Line company, whose stock experienced a short surge in popularity in the late 1920s after Lindbergh's transatlantic flight. The only problem was that the company was a railroad, first founded in the early 1800s. The "air line" part of its name was a reference to direct route from point A to point B, 'as the crow flies'.
[deleted]
Pretty clever and effective message. I'd put money on this being shared by all my friends on Facebook in a few days.
Trump's last couple tweets have backfired and actually increased his targets' stock price though. You might have to flip the algorithm around if this continues.
Trump's last couple tweets have backfired and actually increased his targets' stock price though. You might have to flip the algorithm around if this continues.
I read it as the stock market betting on the constitution. Mr Trump is not allowed to impact Nordstrom negatively for his daughter's sake.
But most of the other tweets are about cases where he could harm them as POTUS.
But most of the other tweets are about cases where he could harm them as POTUS.
If he can't do anything, why would the stock change at all?
Speculation again: it highlighted that Nordstrom would not be pressured into a decision that would yield poorer results.
Wouldn't that be illegal?
If you trade fast enough it still works. Nordstroms took a hit for few minutes before coming out slightly ahead.
If you trade fast enough it still works. Nordstroms took a hit for few minutes before coming out slightly ahead.
> Nordstroms took a hit for few minutes before coming out slightly ahead.
That effect is most likely due to automated traders trying to profit from Trumps tweets.
That effect is most likely due to automated traders trying to profit from Trumps tweets.
Brilliant. I've been thinking about something like this for a while.
Why don't you take it to the next level? Provoke Trump on Twitter, associating yourself with a company. Then short that company's stock and wait until he lashes out against them. Profit!
Why don't you take it to the next level? Provoke Trump on Twitter, associating yourself with a company. Then short that company's stock and wait until he lashes out against them. Profit!
It's weird because he probably doesn't read his mentions... except sometimes he RT's someone in his mentions?
Is he looking?
Is he looking?
Every time he Tweets something, he gets tens of thousands of responses in a matter of minutes, and when he's not tweeting anything, people are still tweeting at him constantly.
There's no way he even reads 1% of it.
There's no way he even reads 1% of it.
He's not the only one handing his Twitter account I'm sure.
An ad agency did this 3 weeks ago
https://www.t-3.com/works/the-trump-and-dump-bot/
https://www.t-3.com/works/the-trump-and-dump-bot/
Novel project, but not useful. Trump tweeted thanks to Intel on Feb 8th which was a super positive tweet. Since then $INTC is down about 2.6%.
He tweeted negatively about Nordstrom, stock went up. We might be onto something here...
One can easily place bets on the volatility of a stock. If you expect it to move, but you don't know which direction, that is tradeable knowledge.
Tweets seem to have an impact of around 1-3% lasting hours to days. Many (most?) stocks have too high implied volatility to begin with for straddling by tweet to be a productive strategy.
How?
I believe it is only logical to assume that the OP meant this as a fun project and not to earn money from.
Anyone knowing a little of the stock market knows that different factors play the game and not a factor. e.g. maybe if Trump wouldn't have tweeted Intel would have gone down >2.6%
Anyone knowing a little of the stock market knows that different factors play the game and not a factor. e.g. maybe if Trump wouldn't have tweeted Intel would have gone down >2.6%
It doesn't need to be right every time, it needs to beat the market. I am not saying that I know that it does beat the market, but it would be interesting to know if it does.
All you have provided is proof that it is sometimes wrong, which is not surprising at all.
All you have provided is proof that it is sometimes wrong, which is not surprising at all.
I have a hunch that both positive and negative mentions means a negative indicator for the stock.
If many people use this bot, it will make Trump's comments actually effective, which is a pretty bad idea imho.
What about a bot which would do just the opposite?
What about a bot which would do just the opposite?
I think you have this backwards. If Trump tweets a negative sentiment, the bot buys from the company. If everyone did that, the price would go up - just the opposite of the current effect!
You seem to have got it backwards:
from https://github.com/maxbbraun/trump2cash/blob/02e66eddc4ea066...
from https://github.com/maxbbraun/trump2cash/blob/02e66eddc4ea066...
# Determine bull or bear based on sentiment direction.
if sentiment > 0:
strategy["action"] = "bull"
strategy["reason"] = "positive sentiment"
return strategy
else: # sentiment < 0
strategy["action"] = "bear"
strategy["reason"] = "negative sentiment"
return strategyI know very little of the stock market, but shouldn't the bot buy shares when he tweets positive comments? Because that's when the stock is expected to rise and you can sell it later for a profit.
Indeed, but the comment you're responding to was tongue-in-cheek, specifically suggesting that Trump being positive of a stock is a negative indicator for it.
As the poster doesn't this gives Trump the power to manipulate markets with nothing more than a tweet?
You could argue he already has this power, but before the message needed to resonate with a large collective of people. Any public figure (like Warren Buffet, etc) can express an opinion that might effect the stock they are commenting on.
However as this group of people automate trades on only the contents of his tweets (and not say the contents of the tweet as well as past company performance, current POTUS approval ratings, dividend plans etc) he gains a scary amount of control over the markets.
To put another way. The only people who know what he will tweet earlier than these bots are Trump and maybe a select group of people he tells before hand.
You could argue he already has this power, but before the message needed to resonate with a large collective of people. Any public figure (like Warren Buffet, etc) can express an opinion that might effect the stock they are commenting on.
However as this group of people automate trades on only the contents of his tweets (and not say the contents of the tweet as well as past company performance, current POTUS approval ratings, dividend plans etc) he gains a scary amount of control over the markets.
To put another way. The only people who know what he will tweet earlier than these bots are Trump and maybe a select group of people he tells before hand.
Politicians impacting the stock market is nothing new. Pipeline and coal companies plummeted with Obama's executive orders, and the executive branch DOJ created a huge drop in prison stocks with what was effectively an indirect tweet. Solar stocks zig zagged according to the latest Solyndra and renewables subsidy activity. The only thing new is Twitter as a more easily machine-readable mouthpiece.
Congress actually gets a free pass on buying and selling stocks with insider information and many have done so for decades: http://www.cbsnews.com/news/congress-trading-stock-on-inside...
Congress actually gets a free pass on buying and selling stocks with insider information and many have done so for decades: http://www.cbsnews.com/news/congress-trading-stock-on-inside...
I think what's novel/different here is the examples you all cited are examples of market reaction to government action, compared to, let's call it "executive sentiment". The distinction here is people are anticipating future actions based a politician expressing feelings rather than taking action.
This could make quite a fun experiment to see if it works. Crowdsource an investment of something like $10,000 and let it run for a year. At the end, donate all proceeds to charity.
Good idea! Where to begin?
Shall we go for refugee charity?
Shall we go for refugee charity?
I would say to organizations that directly support people, be it Direct Relief, The ACLU, or Charity: water.
Other good options are FIRST, Girls Who Code, and The Geek Group, all orgs that focus on STEM Education and getting people into the STEM fields.
Just to name a few groups to directly counterbalance his behavior.
Other good options are FIRST, Girls Who Code, and The Geek Group, all orgs that focus on STEM Education and getting people into the STEM fields.
Just to name a few groups to directly counterbalance his behavior.
> Other good options are FIRST, Girls Who Code, and The Geek Group, all orgs that focus on STEM Education and getting people into the STEM fields.
How do these technical organizations counterbalance anything he is doing?
How do these technical organizations counterbalance anything he is doing?
It did work* as of December 2016, but I would guess something as accessible and straightforward as this has been arb'd out: https://www.bloomberg.com/view/articles/2016-12-07/flash-cra...
________________________
*But the devil is in the execution - and the amount of capital leveraged.
________________________
*But the devil is in the execution - and the amount of capital leveraged.
Wouldn't have been that uncommon to see someone testing this out with real money, see some early successes and start upping the ante, only to have the Nordstrom event lose them a substantial sum.
Unless you consider giving money to the counter party on your losing trades as well as the brokerage to which you pay commissions to be charitable contributions, you would be better off just giving the 10k straight to a good cause.
(I know this is just for fun, but...) I believe this won't work because of high-frequency trading. By the few seconds this latent python script will take to get the tweet, analyze the tweet, and execute a trade, high-speed bots will have already done something similar to a price level they decided was appropriate using sophisticated algorithms.
So basically, instead of this bot betting that Trump's tweets will change stock prices, you're actually betting on the HFT bots being wrong about how much Trump's tweets change stock prices.
So basically, instead of this bot betting that Trump's tweets will change stock prices, you're actually betting on the HFT bots being wrong about how much Trump's tweets change stock prices.
This implies that HFT algos know of Trumps tweets. Is this really done?
The fact that Trump has the vocabulary of an 8th grader makes this a lot easier.
From a brief search, most presidential candidates speak at around an 8th grade level. (Which makes sense. They need to appeal to a broad audience, and speaking at a higher level is usually counterproductive anyway unless you have a specialized audience.) Trump's speaking level is more like 3rd or 4th grade.
From a recent Fresh Air interview with Trevor Noah. Earlier on he explains with a more personal anecdote why simpler language matters. But is there such a thing as too simple? Is 8th grade language more effective than 4th grade language? Later on Trevor Noah says
You know, funny enough, one of the biggest moments of
realization was when Donald Trump won the election because
when I came into the show, I said, I think this guy can win.
This was when he first came down that escalator. He gave his
first speech.
And then I was like, wow, this guy's going to do well. And I
remember people laughed at me. People were like, oh, you
silly ignorant person who's just come to this world. You
clearly shouldn't be at "The Daily Show" 'cause you don't
know what you're talking about. And I was like, but I don't
know. He seems like he connects with people. I can relate to
him as a performer. I can see what tools he's using. He's
good at riffing. He's good at taking the crowd on a journey.
I can see what he's doing.
And people would say - and all throughout the race - and
there were times when, on the show, I would mention it. You
know, I mean, that's why I said Trump reminds me of an
African dictator. And that's where that came from because
everyone said to me, this guy is - he's just a fool. He's
just - he's a buffoon. I said, yeah, you can say that. But
I've seen this before. I have seen this before. I've seen
clowns that go on to take over their countries. I've seen
buffoons who end up ruling their worlds. And it came to
pass.
Source: http://www.npr.org/2016/12/16/505847054/trevor-noah-says-he-grew-up-in-the-shadow-of-a-giant-his-momAs does most of the country...
I have been doing the opposite.
Whenever Trump signs on executive order or signals an intention, I presume it will either fail or will end in bad results for the poor and middle class.
Then, working as if that were true, I see if there are any stocks or ETFs that would benefit from that and buy some.
I have been doing pretty good!
Whenever Trump signs on executive order or signals an intention, I presume it will either fail or will end in bad results for the poor and middle class.
Then, working as if that were true, I see if there are any stocks or ETFs that would benefit from that and buy some.
I have been doing pretty good!
The market as a whole is going up. Are your seeing above market average returns?
Very much so! [1]
You can even see on the chart how there was very little until inauguration, giant leaps after unpopular EO's, and you can even see the portfolio drop when Trump took a beat and eased up on the EOs after Feb 3rd.
[1] http://i.imgur.com/OoeMEJF.png
You can even see on the chart how there was very little until inauguration, giant leaps after unpopular EO's, and you can even see the portfolio drop when Trump took a beat and eased up on the EOs after Feb 3rd.
[1] http://i.imgur.com/OoeMEJF.png
This bot watches Donald Trump's tweets and waits for him to mention any publicly traded companies. When he does, it uses sentiment analysis to determine whether his opinions are positive or negative toward those companies. The bot then automatically executes trades on the relevant stocks according to the expected market reaction.
OK, so what's the expected market reaction? If Trump hates your company, does that make your stock go up, or down?Down on the immediate, up after some hours:
The article just mentions how it ended the day (UP), but it started by going DOWN quite a few % after Trump spoke against it:
http://fox6now.com/2017/02/09/nordstrom-stock-defies-preside...
The article just mentions how it ended the day (UP), but it started by going DOWN quite a few % after Trump spoke against it:
http://fox6now.com/2017/02/09/nordstrom-stock-defies-preside...
I think Nordstrom stock went up after a negative tweet because it was seen as good publicity for the company. Trump didn't actually "threaten" to retaliate or anything, whereas for companies like Ford or GM he actually said he would impose a heavy "border tax" if they opened factories elsewhere.
perhaps further sentiment analysis could be used to determine whether the tweet implies the company can expect government action for/against them.
Maybe a bit difficult to do so because of the limited amount of data, but we could maybe only look at the tweets with positive sentiment, in which case the stock price will likely go up. As it is good publicity for the company and Trump was positive about the stock as well.
Cool project!
Makes me want to think of another fun way of crowdsourcing stock tips for fun.
Maybe something like TwitchPlaysWallStreet?
Makes me want to think of another fun way of crowdsourcing stock tips for fun.
Maybe something like TwitchPlaysWallStreet?
I have one of these as well, but i would've died if it was live trading during the nordstrom incident. They've gone up quite a bit since then.
Regardless of this bot being complete, there are better options already mentioned using options instead of short term stock purchases.
Looks like deciding the sentiment of the tweet is still on the to-do list.
def get_sentiment(self, text): """Extracts a sentiment score [-1, 1] from text."""
Looks like deciding the sentiment of the tweet is still on the to-do list.
def get_sentiment(self, text): """Extracts a sentiment score [-1, 1] from text."""
# TODO: Determine sentiment targeted at the specific entity.I like this. I think something similar for Theresa May and the GBP:EUR exchange rate might be a good addition.
Won't work as well: the market now prices in the drop in GBP after she speaks, so as soon as there's even a hint she's going to say something substantive, the market drops like a stone, then recovers a bit if she doesn't say anything too awful.
Nordstrom went up after Trumps rant, didn't it? But all in all this looks like a fun thing to do.
It would work better is you knew in advance what Trump is going to tweet, not possible of course unless you work for twitter or for Trump?!
HFT it - get a server near in network terms to the Twitter servers that handle Trumps tweets; use the millisecond advantage to buy ahead of the other bots, ...
That would likely be classed as "insider trading":
https://en.wikipedia.org/wiki/Insider_trading
https://en.wikipedia.org/wiki/Insider_trading
For that you'd have to be an "insider" which obviously isn't the case here.
You don't need to be hired by the company to be classed as an insider (though that obviously also counts). If you are privy to non-public information (which you would be if you were forewarned about a Trump PR stunt before it happened) and then you trade stock based on that information then legally you could be classed as an insider.
In fact that wiki link I posted earlier previously says just this: https://en.wikipedia.org/wiki/Insider_trading#Definition_of_... (last paragraph on 'Definition of "Insider"')
In fact that wiki link I posted earlier previously says just this: https://en.wikipedia.org/wiki/Insider_trading#Definition_of_... (last paragraph on 'Definition of "Insider"')
Who is the "insider" in this context then?
Here's a hypothetical scenario:
My buddy Sean from the white house texted me a few days ago that "Trump is going to make negative comments about Nordstrom soon", I shorted Nordstrom stock based on this information and made huge profits when Trump said the things Sean promised he would.
Do you think someone would be guilty of insider trading here? Nobody involved is connected to Nordstrom in any way.
Here's a hypothetical scenario:
My buddy Sean from the white house texted me a few days ago that "Trump is going to make negative comments about Nordstrom soon", I shorted Nordstrom stock based on this information and made huge profits when Trump said the things Sean promised he would.
Do you think someone would be guilty of insider trading here? Nobody involved is connected to Nordstrom in any way.
Yes, you are guilty by trading using non public information about a material event.
That information would have to come from a Nordstrom insider for it to be "insider trading". Neither Trump or Sean are Nordstrom insiders.
It's also extremely important to note that the SEC and the courts have very different definitions of "insider trading".
It's also extremely important to note that the SEC and the courts have very different definitions of "insider trading".
i don't mean to sound dogmatic but the source I cited does explicitly say that the "insider" does not have to work inside the company specifically but rather just be privy to non-public information.
Unless you can find another citation that contradicts my point then I'm going to have to assume my point is correct. And I say that welcoming a correction in the name of "science" :)
Unless you can find another citation that contradicts my point then I'm going to have to assume my point is correct. And I say that welcoming a correction in the name of "science" :)
>In the United States, Canada, Australia and Germany, for mandatory reporting purposes, corporate insiders are defined as a company's officers, directors and any beneficial owners of more than 10% of a class of the company's equity securities. Trades made by these types of insiders in the company's own stock, based on material non-public information, are considered fraudulent since the insiders are violating the fiduciary duty that they owe to the shareholders. The corporate insider, simply by accepting employment, has undertaken a legal obligation to the shareholders to put the shareholders' interests before their own, in matters related to the corporation. When insiders buy or sell based upon company-owned information, they are violating their obligation to the shareholders.
Presumably it's not this chapter you're referring to.
>For example, illegal insider trading would occur if the chief executive officer of Company A learned (prior to a public announcement) that Company A will be taken over and then bought shares in Company A while knowing that the share price would likely rise.
Probably not this one either
>In the United States and many other jurisdictions, however, "insiders" are not just limited to corporate officials and major shareholders where illegal insider trading is concerned but can include any individual who trades shares based on material non-public information in violation of some duty of trust. This duty may be imputed; for example, in many jurisdictions, in cases of where a corporate insider "tips" a friend about non-public information likely to have an effect on the company's share price, the duty the corporate insider owes the company is now imputed to the friend and the friend violates a duty to the company if he trades on the basis of this information.
Despite the fact that this chapter doesn't contain anything relevant either, it's probably this one you're referring to. There's no corporate insiders or relationships involving a duty of trust here.
I think you may be misinterpreting your source.
Presumably it's not this chapter you're referring to.
>For example, illegal insider trading would occur if the chief executive officer of Company A learned (prior to a public announcement) that Company A will be taken over and then bought shares in Company A while knowing that the share price would likely rise.
Probably not this one either
>In the United States and many other jurisdictions, however, "insiders" are not just limited to corporate officials and major shareholders where illegal insider trading is concerned but can include any individual who trades shares based on material non-public information in violation of some duty of trust. This duty may be imputed; for example, in many jurisdictions, in cases of where a corporate insider "tips" a friend about non-public information likely to have an effect on the company's share price, the duty the corporate insider owes the company is now imputed to the friend and the friend violates a duty to the company if he trades on the basis of this information.
Despite the fact that this chapter doesn't contain anything relevant either, it's probably this one you're referring to. There's no corporate insiders or relationships involving a duty of trust here.
I think you may be misinterpreting your source.
It's not non-public information, it's non-public insider information, upon which you cannot legally trade.
"illegal insider trading requires that you not only trade on the basis of important nonpublic information but that you also have some sort of duty to keep the information confidential." - Kiplinger
If you overhear insiders talking, you can trade on it. (Unless you're in a position where they have reason to expect that you cannot, such as if you're an employee, etc.)
"illegal insider trading requires that you not only trade on the basis of important nonpublic information but that you also have some sort of duty to keep the information confidential." - Kiplinger
If you overhear insiders talking, you can trade on it. (Unless you're in a position where they have reason to expect that you cannot, such as if you're an employee, etc.)
> mention any publicly traded companies
How often did that happen in the past?
(Not paying attention, specialty of the house ;-)
How often did that happen in the past?
(Not paying attention, specialty of the house ;-)
[deleted]
You can check that at https://twitter.com/Trump2Cash.
This is fun. However, does this bot perform better than a random bot? and if yes, how much?
According to http://trump2cash.biz/ ,
"Overall, the algorithm seems to succeed more often than not: The simulated fund has an annualized return of about 59% since inception. There are limits to the simulation and the underlying data, so take it all with a grain of salt."
"Overall, the algorithm seems to succeed more often than not: The simulated fund has an annualized return of about 59% since inception. There are limits to the simulation and the underlying data, so take it all with a grain of salt."
Yes, I saw that. What we don't know is whether the bot just got lucky. Inferential stats are needed to determine this.
I'm sure the data is inconclusive for now.
I'm also sure that a fair number of data samples could be obtained in a very short time.
Not sure, every Trump tweet that makes a positive or negative statement about a company adds one data point. So the number of samples is going to be rather small. However, whether the bot can be shown to perform significantly better than chance also depends on the size of the effect of a Trump tweet. If they produce huge bumps, a small number of tweets might be enough to show that this bot is working. Would be nice to be able to put a number on this.
But see this, which says his tweets generally don't make much difference: https://www.ft.com/content/a962c1f8-ee44-11e6-930f-061b01e23...
the problem is hedge funds are already on his twitter like white on rice. Maybe there is hope in looking for breaking news from less-followed accounts.
I can't state how stupid this is. As if that person's bullshit's power of nuisance wasn't large enough, let's add automated echo chambers with a direct effect on the economy!
Don't be surprised if this crazy economic system can collapse any seconds with ideas like this.
Don't be surprised if this crazy economic system can collapse any seconds with ideas like this.
ldev(5)
How many times do we have to go over this?
stocks are a random walk.
stocks are a random walk.
That may or may not be true, but it's irrelevant in this case. The bot is basically front-running the market, or trying to anyway, by trading directly on a stimulus that the market (potentially) takes time to internalize and react to.
If this worked, I'd expect the HF funds to start doing it too, and even faster, and then the advantage would be destroyed.
If this worked, I'd expect the HF funds to start doing it too, and even faster, and then the advantage would be destroyed.
This is not front running (which is illegal). It's trying to be faster than people who trade manually based on the same info. The term front running has a pretty clear definition, it's roughly when a broker trades on your orders before executing them.
Ok, simple enough, go on.
> When he does, it uses sentiment analysis to determine whether his opinions are positive or negative toward those companies.
Eh, sentiment analysis isn't perfect but it has come a long way, plus Trump does typically say what he means in simplistic language.
> The bot then automatically executes trades on the relevant stocks according to the expected market reaction.
Ah market psychology. Stop. Do not pass Go. Do not collect $200. This is the tricky bit that a toy project will never get right and turns your slick algorithmic trading project into a monkey and a dart board.
Though this is a sweet example of an API mashup.