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 commentsThis could happen because of fraud by the exchange, fraud against the exchange, hacking of the exchange, or regulatory risks where other financial intermediaries stop working with an exchange or regulators threaten to punish an exchange if it processes certain transactions.
Some people have suggested that because arbitrage opportunities are pursued aggressively, most price differences between cryptocurrencies and cryptocurrency exchanges that persist are probably mainly due to people taking account of counterparty risk. In that case you could still profit some of the time by betting that a risky exchange will remain solvent, but you might be taking a larger risk than you realize.
Another interpretation is that some apparent cryptocurrency arbitrage opportunities are really opportunities to earn a premium for helping people evade capital controls and other regulatory restrictions on moving money around. For example, there are lots of people in China who would be happy to pay you a premium if you'd accept a payment in China and make a corresponding payment in Canada. In that case you might feel like you're being a clever arbitrageur but you're largely receiving a payment for helping someone circumvent regulations¹.
(The implicit moral opprobrium that might be read there isn't intended, but I think it's interesting to consider how cryptocurrencies can sometimes make people feel very clever when they aren't, in fact, the cleverest ones in the situation!)
(¹ which isn't necessarily unreasonable to describe as arbitrage)
Over the last 3 months, January to March, I've had a return of just under 50% (in spite of the massive down turn in the crypto market). Which sounds great, but I only turned it loose on about $250 so we're not talking about buckets of money here. With higher amounts of capital you run into other issues that would need to be addressed in the algorithm/strategy.
I've often been told the same thing (you can't beat HFT, large firms, etc) but in the end it's not about beating them. It's about finding a strategy that works, that can be automated, and having the patience to let it run and do it's thing. I only trade about 1 to 2 times per day (not HFT) and only rely on fundamental data (no inside info, no "get the data before everybody else and act on it", etc). Keep it simple.
Happy to answer any questions.
To get started, I worked backward. The strategy is simple enough that you can execute it manually (e.g. read/interpret the indicators on a chart/graph and trade when the time is right). Once I determined a given strategy might be viable I formalized the strategy by writing a script to backtest it on historical data. Once it checked out I wrote a script that accepted real-time data from exchanges (I use GDAX, but most others with a solid API will work equally as well) and traded based on the incoming data.
I wasn't comfortable/familiar with any of the "hosted" trading platforms out there for cryptocurrencies so I built my own. It's very simple but it gets the job done and has proven very stable.
The most important part, for me, was to get the data streaming right. I ended up writing a Node.js server that listens to the GDAX web socket and feeds the data to a Redis instance. From there I have a separate process for each strategy I'm running that listens via a redis pubsub channel for new data. This was important for scalability and reliability. It also served to make the platform modular. For example, it can handle any number of data sources (exchanges) simply by adding a "connector" to the data source that feeds the data to redis. It can also handle as many strategies as you can think to throw at it simply by adding another script/process that subscribes to the relevant pubsub channel for the data it needs to execute the strategy.
It's probably overkill but it's made testing new strategies very easy and fast. I can take an idea for a new strategy, code it up, and have data streaming to it in real time in less than 10 minutes. Then it's just a matter of fine tuning the strategy.
A little long winded but I hope that answered your question...
That's sounds like a lot of work. What made you uncomfortable? Have you looked into using self-hosted trading platforms such as ccxt? It's an open-source JavaScript / Python / PHP cryptocurrency trading library with support for more than 100 bitcoin/altcoin exchanges
https://github.com/ccxt/ccxt
Continue this thread — 1 reply
Find those patterns and trade on them.
Do you know if people are doing this?
The problem is those patterns quickly disappear as automated trading picks them up. The window goes from 5-10 minutes to seconds or less. Much harder to act in such a small window.
I'm not sure what the technical term is for a time-lag correlation though, since that's what you're really after; it's not an interesting correlation for your model if you don't have time to trade ETH on the BTC signal.
[1]: https://www.quantopian.com/lectures/beta-hedging
Pure voodoo
Long answer: not in the beginning, then a long period of breaking even, and eventual profitability.
My algos trade commodity futures(nasdaq, 30-year bonds, etc). My platform is Multicharts.NET, which supports writing your strategy components in C#.NET. I'm not a .NET fan, but the platform is solid and this is about dollars, not language preference.
Also...regarding HFT - those aren't likely what you think they are. In commodity markets, HFT trading typically follows a simplistic algorithm of "above or below XYZ bar EMA", which anyone can do. The HFT portion of it comes in through the process bidding the inside bid(on the way up) or offering the inside offer(on the way down) faster than the other HFT algo. So where a price may eventually see 100 bids on the way up, and 20 of those will be filled, the HFT's goal is to place bid #2 or #3 out of that 100 - competing with hundreds of humans and other HFT's for that spot in the queue. Trying to compete with HFT is very difficult unless you have enough capital to colo next to the exchange(CME in my case), as well as handle commissions(through paying them, or paying for a seat to negate them).
I've attached a screenshot of the chart output from my algorithm today. Assume every time you see "SE" or "LE", that a long(LE) or short(SE) position was established. Positions close when the first of 4 events happens: stop loss, profit target(25pts for today), trailing stop(10pt), or an opposing signal is generated. It's simple, it's not that sophisticated, but it is consistently profitable. You can develop your own similar algorithms, or use many out-of-the-box algorithms from places like iSystems, or strategies that come built-in with your platform(Multicharts.NET has many). The key is backtesting, properly scheduling around economic events, and having enough capital to survive the inevitable drawdowns.
Link to screenshot of today's chart output from algo: https://www.dropbox.com/s/bms9kuqn529iyqg/Screen%20Shot%2020...
If you go down this road, I wish you the best of luck. It's fun, it's difficult, and incredibly rewarding if you get it right.
All comments shown.
Couldn't load more comments. Check your connection and try again.