Lurker News
Is 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 comments
samfisher834 replies#
You probably can't do HFT trading because you need to have capital to reduce latency. Maybe you can rent servers very close to the trading centers, but this still will cost money.

You can use http://www.quantopian.com to try out different algorithms. It will tell you how well your strategy works.

dragthor#
quantopian.com sounds interesting. I am going to check it out.
hliyan2 replies#
Concur. You won't be able to beat players whose HFT systems are colocated in the same datacenters as the exchange. And you will not be able to beat those systems built using lower level languages like C++ or, worse yet, dedicated hardware.

Source: 5+ years in HFT development

jameskegel1 reply#
I’d be interested in picking up what you are putting down. Do you have a blog or other content channel?
hliyan#
Unfortunately I got tired of that world around 2013 and moved to the food services industry. I usually write here: https://medium.com/@hnlean but it has little to do with HFT anymore...

Edit: actually, see my response to the neighboring comment too.

InterestBazinga4 replies#
Why does a programming language matter in terms of algorithms? Can you elaborate on that?
dllthomas#
A lot of algorithms are dependent on the ability to execute quickly. If yours is not, then PL doesn't matter (at least, in the respect the parent was discussing).
bluGill1 reply#
Because big money will trade enough dollar value as to change the price by their action so whoever is second missed the opportunity.

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

PeterisP#
For HFT, it's not that every second counts, is that every millisecond (or even lower) counts. You're competing with other, similar algorithms for picking up opportunities. The assumption is that you're not capital constrained, you (or the competitors) can immediately exploit all the volume of such an opportunity, the deals you submit shift the prices so that it disappears.

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.

hliyan#
Every microsecond counts. We've done some pretty crazy sounding things to get the last bit of juice out of the system:

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

timothylaurent1 reply#
You can also plug Quantopian into RobinHood for $0 trades.
ARussell1 reply#
Wasn't support for that removed?
jeffreyrogers2 replies#
There was a great post on HN fairly recently written by someone who used to work in HFT. He talked about how they tapped the incoming network cable to read the incoming prices on an FPGA faster than they could make it through the OS's network stack. I think they were sending out trades in response to the new prices before they would have even made it to userspace on an OS.
kasey_junk#
As a bit of context, that technology will not be any where near your most expensive investment for HFT. Years ago I was on a trade where we could rent that technology for 1500 per month. It can only have come down from there.

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.

simonhughes22#
It's not hard to build a machine learning model that can predict the price direction with slightly more than 50% accuracy. However, once you factor in the trading fees, slippage and the spread, you will almost always lose money. I built a number systems that looked like easy money making schemes that would make small amounts on most trades, but once you factor in trading costs (which most people forget about initially) you will lose money most of the time. That applies to the stock market and also crypto currencies if you are trying to predict the price direction. I have heard also that predicting volatility in the equities market is easier and the better strategy. To make money off that you would need to use derivatives. It's less clear how to do this in crypto unless you are trading futures, and I think making money off the price volatility there requires a different strategy, making heavy use of limit orders and stop losses.
iliicit3 replies#
I made some good money (millions) in 2017 by algo trading crypto. Now in 2018, the bear market is on, but my pnl is still decent. I collected data, trained models, wrote execution strategies, automated everything. I was successful because I was moving fast, trying things, breaking things, etc.

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.

headmelted2 replies#
You made millions of dollars last year then applied for a series of senior developer jobs two months ago?
iliicit#
yes, just to see if I'm hireable material - turns out I'm not, lol.
bitcoinmoney#
LOL. nice one.
cryodesign1 reply#
Wow, congrats and well done. Looks like you don't have to apply to jobs anymore ;)

- What was your initial investment? - And did you have any trading experience to come up with those strategies or learned on the go?

iliicit#
i started with 5 BTC in 2013.

learned on the go, but had access to friends in hedge fund business

jimbob212 replies#
Give me your secrets
45h34jh53k4j#
HODL during a 10x year?
theparanoid#
I suspect hard work and smarts. I've made money in sports betting and it's mostly grinding through looking opportunities and avoiding bad bets. The smarts part is avoiding bad bets. If you don't know who the sucker is, you're the sucker.
downandout#
Here’s an interesting article about using Google Trends to beat the market that may still work:

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.

Load more comments