Ask HN: Anyone making money through algorithmic trading?
389 pointsIs there anyone here making money on smaller trading strategies (i.e. in the stock market or cryptocurrencies) that would not be interesting enough for larger algorithmic trading firms?
I'm aware the standard advice is that you will lose your shirt attempting to compete with algorithmic and HFT firms. But are there opportunities out there for smaller strategies to generate alpha? (I'm assuming yes, but would be great to find people who actually do this -- no need to disclose _how_ you actually do it, obviously)
Comments (245) 69 threads
Earlier commentsYou can use http://www.quantopian.com to try out different algorithms. It will tell you how well your strategy works.
Source: 5+ years in HFT development
Edit: actually, see my response to the neighboring comment too.
Languages like python are immediately out, they make no attempt to be fast (which is fine for their niche). Even languages like Java are out, the JVM is too smart: it turns out that the algorithm needs to analyse a few thousand possible trades where the answer no trade before it gets one where the answer is yes, as a result Java will optimize for the common no path. In C++ the programmer will lie to the optimizer claiming that the yes path is the most likely even though it isn't! As a result code written in C++ will always have the yes path as most optimal: when a trade should be made the java program pays a CPU branch misprediction penalty and the C++ program will not thus C++ wins the trade. Of course for the above to work you need cleaver programmers who spend time at the profiler and know how to make the CPU work for them.
C++ has one other useful advantages over some of the competition: it won't waste CPU checking for things like dereferencing a null pointer. Speed is important, you should verify via other means (unit tests, formal methods static analysis, or have the checks that you run on dummy data and compile without them for production)
Thus C and C++ are the only useful choices: the compilers have good optimizers (this rules out a lot of other compiled languages), they don't use CPU to check for "can't happen" errors, and you can lie to the optimizer in useful ways. There are other advantages, but the rest are things that a good programmer could easily work around (ie write a new stat structure from your CS textbook)
Continue this thread — 1 reply
This means that whoever is not the first to take that opportunity doesn't get it, and if you're reliably a millisecond slower than a competitor then you might as well not even try.
1. Write a converter to convert a proprietary interpreted business rule language to C++
2. Make all messages fit the maximum ethernet frame size to avoid fragmentation overhead
3. Make the transported message format the same as the memory object format to avoid the packing/unpacking overhead
4. Predict and pre-allocate object pools in heap memory to avoid heap lock overhead
5. Statically link all libraries
6. Optimize key functions at assembly level
7. Turn all record ID's into zero based indexes and covert most lists and maps into arrays for rapid lookup
8. No indexes or foreign constraints in the rapid-write areas of DB
9. Hand rolled on-disk cache file formats that only operate in append mode to prevent seek overhead
10. And finally (this was after my time) trying to implement the TCP stack in FPGA
Worth a read.
Your time is an order of magnitude more expensive than that. Other expenses besides your time include making sure you have the fee structure to be competitive & getting a clearing partner that is ok with letting you fire off enough orders to make it worth while.
While crypto was and still is my turf, I think I could also do well in the stock market. The problem is that the entry barriers in the stock market are quite large. By my estimates, it will cost between 10k and 100k a month to run an HFT strategy fast enough to compete with the fastest players in the field (e.g. running market making strategies). If you have good alpha you could probably get away with slower and cheaper access.
In the crypto world, the market access is free for all, and everybody has equal standing (from what I know). After implementing some WebSocket/JSON APIs you get access to the market that turns around 100s of millions USD per day. Of course, it's much smaller than the stock market, but it's real nevertheless.
I think it's a myth that smaller strategies cannot compete with established HFT firms. It's also a myth that you need grad level knowledge of math/statistics. It might even hurt, becuase phds will be prone to "do things the right way" as opposed to "do things that work". I think it's also a myth that HFT firms hire exceptional talent. In fact, most firms have rather mediocre staff. The reason is that most firms don't make exceptional money. So they don't have a salary pool large enough to pay exceptional people exceptional wages. I'm talking upward from 300k. Companies like Google will happily pay skilled engineers around that watermark. The Google/startup jobs might feel dull, but the finance jobs are way more boring and less rewarding... I can rant on this forever - lol.
That being said, I consider myself mediocre developer as well. Couple months ago I applied for Senior Developer jobs at 3 firms and didn't get a single job offer. I didn't try hard, didn't prepare for the interviews, but still.
Edit: I applied for these jobs just to see what's up. Neve intended to take the jobs.
- What was your initial investment? - And did you have any trading experience to come up with those strategies or learned on the go?
learned on the go, but had access to friends in hedge fund business
https://www.nature.com/articles/srep01684
The article is from 2013, but if anything it may be more predictive today given the ubiquity of Google search. At the very least, since it explains the method they used to find this signal, even if the specific keywords they used the trends for are no longer predictive, you may be able to find others that are. The strategy yielded a theoretical (backtested) return of 326% over a 7 year period.
All comments shown.
Couldn't load more comments. Check your connection and try again.