6 ms·
Yes. I've developed a simple strategy that algorithmically trades cryptocurrencies (mainly ETH and BTC because volume, but it would apply successfully to any of
by jmhyer123 8y ago
Yes. I've developed a simple strategy that algorithmically trades cryptocurrencies (mainly ETH and BTC because volume, but it would apply successfully to any of the others as well). The strategies are simple, they are based on simple technical indicators, and result in about 2 trades executed per day. The strategy can be applied to "normal" equities as well but it performs particularly well on cryptocurrencies due to the amount of volatility in the market. Also the amount of freely available data for cryptocurrencies makes implementation much easier (and cheaper).
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.
- kojeovo 8y agoCare to share a bit more on the strategy? I've been looking at exchange APIs and looking up strategies online, but I haven't started implementing anything. Wondering how you approached it once you had the idea to trade algorithmically.
- jmhyer123 8y agoI have two strategies that I use, one for up/bull markets (e.g. April 1st to present was a great example) and one for down/bear markets (e.g. January to April). They evaluate a number of technical indicators (e.g. moving averages, RSI, CCI, etc) to determine when to buy and sell. 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...
- hbcondo714 8y ago> I wasn't comfortable/familiar with any of the "hosted" trading platforms out there for cryptocurrencies so I built my own 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 https://github.com/ccxt/ccxt
- jmhyer123 8y agoWow, CCXT looks really nice, I'll have to dig more into that. Thanks for sharing. To be fair, I didn't look very hard for a good platform. I was aware of a couple that I had heard about either through friends or tangentially through HN comments on other stories but when I looked into them they either looked super shady and untrustworthy (yeah, I know, judging the book by it's cover) or forced you to implement your strategy in their language of choice (one was Python, one was a proprietary script-y language) and I wasn't interested in that. Surprisingly it wasn't as much work as you'd think. It started as a hobby on the side so I wasn't worried about building a full-fledged trading platform that supported every exchange and every imaginable strategy type so I was free to keep it simple and focus on the one exchange I had an account at (GDAX) and the two or three strategies I had in mind at the time.
- attilathecoder 8y agoAny interest in open sourcing the Node.js /Redis component? I was thinking of a similar implementation but using Kafka. Your piece would give me and potentially others a way to get up and running pretty quickly.
- vinhboy 8y agoI have a strategy I wanted to try. Look at historical percentage difference between currencies. See if there is any patterns like, every time BTC drop 10%, LTC drop 20%, or something like that... Find those patterns and trade on them. Do you know if people are doing this?
- jmhyer123 8y agoI've seen people try that and I've noticed the correlation myself. Around the end of last year (November/December 2017) it was possible to watch BTC jump 5-10% and jump over to ETH and catch the same wave 5-10 minutes later. 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.
- daleco 8y agoAll of these alt coins are tied to just few pairs (mostly BTC or ETH). When I was looking at the relationships in different instances (just eye balling, no statistical analysis), it seems that some the coins are just more or less volatile.
- theptip 8y agoThe degree of coupling between assets is called "beta" - typically you're trying to reduce the coupling of one asset to another in your portfolio (explanation [1]) but you can definitely work the other way to make predictions. 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 https://www.quantopian.com/lectures/beta-hedging
- gricardo99 8y ago>based on simple technical indicators Pure voodoo
- jmhyer123 8y agoPerhaps. But if "voodoo" results in consistent returns then who cares?