Show HN: How I built a trading signal by scraping Nasdaq for short interest
quantopian.com
quantopian.com
Past performance does not guarantee future results" is still the operative principle here. Data-mining discovers patterns, but it doesn't lead to deep insight into causes, and markets are perturbed by many events that you don't put into your training algorithm. "The market can remain irrational longer than you can remain solvent" is still important investment advice.
You can never build a trading signal just by scraping historical data, unless you like losing your shirt.
Can you tell I'm reading Antifragile: Things That Gain from Disorder just now? I'm very sensitive to errors in statistical thinking today.
Whether the stockmarket can or cannot be predicted on the short term based on its past is another question... but I've been gathering some convincing evidence that it cannot (as in, its variations have no intrinsic structure; though it can still be predicted based on various external factors).
Though in order to be really effective you'd need to do it before Wall Street traders' reactions adjust the prices, ie. get access to Bloomberg's B-Pipe [1], do real time semantic analysis and place orders with ultra low latency. Which quite a few trading firms are already doing...
Other factors include P/E ratio (only accurate in the longer term), div yield, recent growth...
[1] http://www.bloomberg.com/enterprise/enterprise_products/data...
Additionally normal cross validation (random or stratified sampling) does not work on time series data since you are in effect cheating by training on events in the future, which your model will not be able to predict. In order to test your model on time series data you would need to hold out a significant chunk of data at the end of the time series.
If you're interested in the general case of predicting the stock market you might enjoy reading up on the Efficient Market Hypothesis[0] which deals quite well with just that question.
Some examples:
* Lehhman's ticker changes on the way down
* GM going bankrupt and then coming back from the dead!
* Skye International used to trade under SKYY (at 0.35c/share), but now SKYY tracks a cloud SaaS ETF 20.60/share). Think you got a big win using that strategy that including buying SKYY? Think again!
The plan is to derive trading signals from insider purchase data while taking into account the insider's relative risk-aversion (estimated from age, salary, sex). At this point I'm just trying to recreate Nejat's results. Data-quality seems to be an issue (stock splits aren't recorded in the yahoo data).
If you would like to collaborate or trade ideas message kal00ma on reddit.
They provide an anonymous financial service.
When someone buys or sells a security, they take on risk in exchange for money. When someone is on the other end of the transaction, they give up money to reduce their risk. That seems fair to me. Just because it's a zero-sum game with respect to money doesn't mean it's a zero-sum game in totality. It's just that you can buy less iPods with risk than you can buy with cash, so you mentally overvalue cash and undervalue the lack of risk.
Also I am talking about trading not market making which can be done automatically, market making only works when you can beat the other guys at making deals and yes you can do that with pure numbers, but again that's not really what were discussing here.
So it can be done, but you need a brain the size of a planet. (I don't have a brain the size of a planet, so I don't build the models)
So in summary: it is too complex to understand, unless you have a very advanced education in the statistical techniques they use to build the models.
(For example I don't have a PHD in physics but a few years of reading and following up on linear algebra, and I can hold my own in a conversation on sting theory with with a PHD Physicist).
These guys certainly knew their stuff, and they also had a system: http://en.wikipedia.org/wiki/Long-Term_Capital_Management
"Most HFTs run a market making strategy. What this means is they play both sides of the table - they take no position on whether a stock will go up or down. Instead, they try to offer securities both to buy and sell. If you want to buy, they will sell to you at $20.10. If you want to sell, they’ll buy from you at $20. As long as their buys and sells match don’t get too out of whack, the HFT will collect $0.10 = $20.10 - 20.00."
Many algorithms stop performing when market conditions (lasting hours, days, weeks, months) change. Having a deep understanding of your algorithm and what makes it successful for any given period of time can better help you make adjustments when needed.
Lastly, this may be where the algo started but not necessarily what they will run in production. It's much more likely to no longer be discussed at this point. Perhaps similar to ideas are worthless, execution is everything for startups.
edit: typo
I agree with you about random noise. Ultimately I'm just looking for something to make me feel like I'm taking an "informed position." You never really know what's going to happen.
For example, buying SPY and holding it for the same period would have outperformed your algorithm.
The intuition behind this signal as a market inefficiency, or 'anomaly' is that the market sees short sellers as informed investors, the so called 'smart money', and there is a herding effect to follow their trades which generates abnormal returns. The same logic can be applied to disclosed insider trades or institutional holdings filings made public via the SEC's EDGAR database.
Fawce's slick implementation of a 'Days to Cover' signal is a great way to highlight the power of aiming new tools like Quantopian at freely available public data stores (which exist expressly to increase market transparency). And sure, it doesn't go the whole way for you on execution details like borrow costs, liquidity etc. but those aspects tend to be unique to each trader.
No money has traded on my version no. But, I understand that asset management firms have licensed the more sophisticated one Jess wrote at TR, so I would think they use it with real money. From what I understand, firms look at numerous signals like this, and then make investments based on a combination of the signals.