6 ms·
This is funny. I wrote a NLP program in the past (as a hobby project only) that analyzed articles and press releases to make predictions on stock prices. I didn
by crazypyro 12y ago
This is funny. I wrote a NLP program in the past (as a hobby project only) that analyzed articles and press releases to make predictions on stock prices. I didn't even think about adding April 1st (and the day before, to be honest) as an exception in the algorithm. Gives me something to do this weekend.
- IkmoIkmo 12y agoHow's the (fictitious) ROI on that? :)
- 1337biz 12y agoI'd like to see an April 1st only algorithm. Just one that knows how to spot a good joke and making money out of it.
- crazypyro 12y agoI was simply using it to predict relatively short-term (between a few hours to 2-3 weeks) movements in the stock. I wasn't using it to even predict the magnitude of the rise/fall beyond a few "tiers". Think like small/medium/large magnitudes and that's not far off. With that said, I had between 60-75% success rate on predicting the direction, depending on how I set different things like requiring multiple sources, confidence required to execute prediction, NLP tweaking, etc. The tiers was worse, but I think it was around 40-45% on the last iteration. Obviously, I would want to get better at predicting magnitude before I used it in any real life trading. It also was highly dependent on the company/industry. It performed better on something like Apple or Google, but worse on some smaller companies in industries that are not near as news heavy. The main goal of the project was just to satisfy my curiosity with algo trading, web scraping and data analysis while giving me another cool project to talk about in interviews, as I'm a college student. I used scrapy, NLTK, pandas mostly.
- nether 12y agoI think a 60% success rate is phenomenal, given that card counting only nets a 0.5-1.0% edge over the house. You've got yourself a 20% edge.
- notahacker 12y agoDon't forget that as the OP pointed out, they tested on direction rather than magnitude; if the losses from the predictions where it got the direction of movement wrong are big enough it might be no edge at all, or a negative ROI.
- lordnacho 12y agoIf it's really 60% and it works over the general universe of shares, you've built a money machine.
- omegaham 12y agoRemember that the general direction of the market right now is upward. This means that these day-trading algorithms need to beat the typical rate of return for, say, a diversified index fund. Many of them don't.
- lordnacho 12y agoWell I'm assuming the guy has thought about that, and his dataset is long enough to be meaningful. He didn't say how much the return varied, which you need for the comparison with the index to make sense.
- kasey_junk 12y agoNope because it doesn't account for risk.
- lordnacho 12y agoThe fact that it works over the universe accounts for the risk. If you have a 60% chance of being right, doing it over a few thousand stocks will make your daily return extremely steady, thanks to the law of large numbers. Of course there are correlations and such things to think about, but it's all controllable with that kind of edge.
- kasey_junk 12y agoNo it still doesn't. Because you have to allocate resources to the positional bet and one side of that bet has virtually limitless risk attached to it and the other has limited upside.
- lordnacho 12y ago
- Symmetry 12y agoNow that this has happened once and people noticed it I bet there are going to be a bunch of bots looking to arbitrage off of other overly-literal bots next April 1st.
- undersuit 12y agoYou make the bot that fools all the other bots. I'll make the bot that fools your bot.
- crazypyro 12y agoI was just thinking that. You'd only have to beat out all the overly-literal bots on a single day, so I'd imagine the complexity of the problem is dramatically reduced. I think ideally you would train a bot to recognize some measure of satire/joking, yet you would only want to execute on the press releases/articles that were just on the very edge of satire, so as to detect satire that fools as many general purpose bots as possible, as fast as possible. I doubt there is really that much of this happening, relative to the size of the market, though.
- wcfields 12y agoThis satire alone created a $100 million bump. It makes sense now that in Feb to do a skunkworks satire/parody engine that runs on April 1st and compares against the other high frequency trading bots that aren't equipped to handle nuance.
- FLUX-YOU 12y agoHm. Maybe I can arbitrage off of the bot that arbitrages off of the overly-literal bots.
- LoSboccacc 12y agoI was thinking along these lines the other day. Maybe stock market is unpredictable without outside world insight, but algorithms probably are. A second order predictor may benefit from it, giving less gains more reliably guessing algorithm behavior instead of stock trends.
- Rainymood 12y agoHi. I chose to write my thesis on NLP with LDA in regards to stock prices. Would you mind exchanging e-mail or facebook so I could ask you some questions? I am really excited about this project but to be frank, I do not know a lot about LDA yet and I was hoping you could help out a stranger over the internet. (University of Amsterdam)
- crazypyro 12y agoSure, I'm only a senior in undergraduate, but I'd be happy to try to offer any assistance I can. I know a little about the subject. I added an email you can contact me at to my HN profile. Let me know if you can't find it.