80 points · by pmorici · 15y ago · 53 comments
So I did some research, and most people who have written them will tell you that in cases like this, training on past data doesn't correlate well with current & future data.
The stock market of 2011 is not the market of 2008.
But what do I know, not like I've actually done it :)
You can rent your trading strategies to others, or rent someone else's strategy.
Also some good info/tools regarding automation.
If you have a good strategy, you won't rent it out, you'll trade it. Why risk others frontrunning you? Of course, you might post a historically good strategy and front run it. Or they might just be risky strategies, which look good for a short time (encouraging people to rent them), but which carry catastrophic risks the creator doesn't want to take on.
I can't see a single reason why someone would post a good strategy here.
Anyone doing serious research into this, will first partition the past data into training and test sets. (And sometimes other validation sets).
So the idea would be to fit a model on one set of past data (the 'training' set), check it works, and then, in the final evaluation, run it on the never seen before, never used, never thought about, 'test' data.
If you have a model trained on 2009, and it also does a great job the first time you run it on the Q1 2010 data that you've never looked at before, I'm now interested, even though every data point is in the past.
I imagine they had to do something like this to pass review.
The Dow Industrial Average over the last 10 years
http://www.google.com/finance?chddm=997050&q=INDEXDJX:.D...
* Notice that the end of 2008 was unusual for the index. 2008 had the most herded and fearful stock market in recent history. If at anytime the stock market was correlated to mood, it would be then. I am not sure if a 2008 analysis can be generalized to any year but 2008.
* They have not done an analysis on 2009 or 2010, and they chose to split the analysis and pick December 2008 based on a qualitative assumption from the "stabilization of DJIA values after considerable volatility in previous months and the absence of any unusual or significant sociocultural events". December 2008 was very much in the midst of the crisis still.
* For their December "stable" data set, they only used 30 days. That is limited in sample size. There is a big pool to draw from since 2009 as the market has been relatively stable.
Also, some food for thought: it would be interesting to see someone testing Twitter moods as an instrumental variable for a project.
But overfitting is definitely still a concern. Looking at the overall trend for the Dow Jones in 2008, I wonder what the success rate of an indicator that always said 'down' would be.
If that were true, there would be an exceptionally easy way to make money: Buy a future or option today based on yesterday's move. Leverage ad infinitum.
Random coin flips also tend to run in streaks, btw - in a few thousand throws, you'll probably have several 10 "head" streaks and several 10 "tail" streaks.
This kind of co-correlation and general market direction is already baked into the option and futures prices. Also, they don't tend to fluctuate as much from day to day, since their prices reflect what the value will be on the contract delivery date, not what the price will be tomorrow. I'm not clear on what profit opportunity you're seeing.
Random coin flips also tend to run in streaks, btw - in a few thousand throws, you'll probably have several 10 "head" streaks and several 10 "tail" streaks.
And in a flat market, that's often the behavior you see. When the market starts trending, though, the coin starts acting 'rigged', and streaks in the prevailing market direction tend to become longer.
Consider a set of random signals; arbitrarily select one as the benchmark. Then from among the rest take the signal that best predicts the daily direction of the benchmark. That signal will likely have much better than 50% accuracy because by definition the worst signal will be around 50% accurate (if it were any less it would have an equally useful inverse correlation).
Then: predicting up or down movement of a stock is very vague. At what time scale, what sort of trades are required and what sort of response times to execute. What are its drawdowns like, does it account for taxes, commission fees etc. Next, use of a complex nonlinear learning model with lots of parameters - raises alarm bells - these tend to be very susceptible to noise, trading data is highly correlated and typical regularization methods often do not suffice. Then there is the whole issue of over-fitting in general, data used to train on (size, survivor bias, accounting for splits and what not) which makes the whole thing very hand wavy. Without additional info as basic as rate of return, the stated 83% accuracy is meaningless. Like with all things, its easy to get results that work within the limited and safe confines of academic testing but actually shipping a working product is another story.
There has always been a draw to beating the stock market. And these days there is nothing more romantic than doing so using Artificial Intelligence! But I think the most important part of any trading strategy is to be made up of parts that are constantly being swapped out and replaced based on research. you can't just throw a machine learning algorithm at it and think job done. The thing will likely only profit for a couple microseconds. however, as an aside, I would not be surprised if one of [anti]spam/virus/botnets or HFT wars will one day produce AI.
An even better question: is the relationship causal? The researchers use Granger causality analysis to test their hypothesis. Wikipedia tells me this analysis "may produce misleading results when the true relationship involves three or more variables." [2] By definition, Twitter and the DJIA are macro aggregates of a number of factors. How could the researchers apply Granger here?
[1] See Table 1 at http://www.sca.isr.umich.edu/documents.php?c=c
[2] http://en.wikipedia.org/wiki/Granger_causality#Limitations
Really? There are some true believers out there under this impression, but I didn't think anyone credible was. It wasn't so long ago that someone showed efficient markets were an P=NP problem.
EDIT: I'm not the one who downvoted you.
The NP completeness of efficient markets has been known for quite a while.
http://dpennock.com/papers/pennock-ijcai-workshop-2001-np-ma...
It wasn't so long ago that some jerks at Princeton wrote a paper along the same lines, completely ignored all the existing literature to make their paper appear more novel, and got a lot of publicity for themselves (hint: prediction markets are unsexy, CDO's are sexy).
Furthermore, the paper you reference (while an excellent and fascinating paper) does not directly bear on the NP completeness of the stock market:
> In Section 3, I discuss the prospect of opening securities markets that pay off contingent on the discovery of solutions to particular instances of an NP-complete problems. Such NP markets would provide direct monetary incentives for developers to test and improve their algorithms, and allow funding agents to target rewards to the designers of the best algorithms for the most interesting problems. In Sections 4 and 5, I discuss markets in #P-complete problems, where prices serve as collective approximate bounds on the number of solutions, and bid-ask spreads may indicate problem difficulty
is his summary of what the paper does (sections 1 and 2 are introductory material). I claim that this does not at all show the NP completeness of markets, and further that it's a claim irrelevant to the discussion here.
In what sense are you claiming that he proves the "NP completeness of markets"? What does that mean? Why is it relevant to whether or not to invest money in the stock market?
(sidenote: I don't think the question of the NP-completeness of some questions related to stock pricing is irrelevant or uninteresting; indeed I just applied to grad school to study problems like these. I just don't think they bear on what you're implying they do)
That said, I voted you up because of your first sentence.
I think people citing the fact the market isn't totally efficient aren't always proving what they think they are proving. The practical difference for the vast bulk of us between a market that is totally efficient, and one that is only mostly efficient but it is very very hard to find the inefficiencies, is pretty much zero. I often see people try to leverage this into the idea that markets are efficient as somehow being "touchingly naive" to score political points in various political fights, but, well, there's a reason you have to reach for that emotional trick, because the facts don't really support the idea of some grossly inefficient market in practice. (Instead, the problem is that efficient doesn't mean what you think it does; it certainly doesn't mean "good" or "moral" or "stable" or anything like that.)