Search
  • timco

Twitter to Trade


Breadcrumb #2. The title says it all. My next advent was to use twitter to trade stocks.

Some background. During college, I was introduced to Dr. Minh Duong-Van. He was a principle contributor to Chaos Theory when completing his phd at Cornell. He than moved onto an entrepreneurial lifestyle where he ran multiple companies. Check it out for yourself on his LinkedIn. All the while, he came from poverty growing up in Vietnam, didn't even learn to read till he was a teenager. This is a nice little biography piece on him. Pretty crazy guy to say the least. In person he hundred percent matched the description.

So what was my job in all this? Technically speaking, I didn't know much at this time. So perfect, I took on all those random tasks that could be automated but are of course not applicable to anything else. Dr Minh already had a couple other talented engineers building the recommendation system and that was fine with me. I was pretty busy with school, job, and other things to learn and build something robust enough to even work.

The basic concept of Twitter sentiment analysis is to follow regarded financial analyst and automate how often ticker symbols are mentioned and if those tweets are positive or not. I read Biz Stone's book learned that news reaches Twitter seven minutes before mainstream media. Speed is everything when automating. It is a proven formula but putting money into this system is a whole different question-whole different topic. I began with a module that applied natural language processing to tweets to say is this positive or not? Here is a sample of what I would be siphoning.


Using Stanford's Part of Speech tagger I was able to grab nouns, adjectives, and verbs and actually derive the sentiment from those parts of speech. With some configuration, I can even assure that tickers become nouns and thus we know which stock the tweet is applied to. The amount of CPU hours while running this is actually infinite. No idea of how to offline this process or even use a server rather than my own computer to process this.

Another task I took on was scraping...everything. Scraping excel documents, yahoo finance, tweets, you name it. Keeping track of these outlets gets crazy when daily recommendations are generated. Dr Minh and I primarily looked at biotech stocks for short term gains since those stocks are so volatile, those of you in finance will know. Looking back at the code is hilarious in itself and something I don't even want to link to since it's amateur hour. The goal for me was to understand the capabilities of technology. What are things the computer will do that a human realistically just won't. What I will show is an excel of my work that shows results of recommended stocks. The results themselves are what are amazing. These sample generated a 50% gain in a matter of weeks. (May have to zoom in sorry for the craziness)




Coming out of it though, this spaghetti code taught me some great things. This experience was all about being practical. Seeing real life results with next to no experience in start ups and producing worthy code was validation for me. The real question is did I make money using this recommendation system?

#random #breadcrumbs #twitter

0 views