Live data from Hacker News

Ask HN: Anyone making money through algorithmic trading?

news.ycombinator.com

11–20 of 254 posts

Re: Ask HN: Anyone making money through algorithmic trading?

#11
post #5

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…

Care 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.

I 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...

Re: Ask HN: Anyone making money through algorithmic trading?

#13
I lost about $100k doing algorithmic trading. I spent the better part of 2 years after work immersing myself in algorithmic trading, understanding the architecture of the stock market, and getting very very deep into the topic.

I found an algorithm that was wildly positive, and traded it on 3 separate markets every night. I learned a lot and I love everything I learned, but it was a very expensive lesson. The #1 thing I learned was that algo trading is mostly psychological, at least for me. I was making big bets (a few thousand dollars per trade) every night and it was emotionally exhausting, and I couldn't handle the pressure. The worst part is that I didn't trust the algorithm, and would cut the trades short instead of waiting for the full profit (or loss). That messed with my results, and in the end it turned into a disaster.

But programming for myself and using real money was such an educational experience. Any little bug meant that I could lose a lot of money so I bug-tested the most I've ever done in my life. And I did things like write my own multi-threaded backtester, working on hundreds of gigabytes of data, so I learned a lot there too.

It was a lot of fun, very very expensive fun.

Re: Ask HN: Anyone making money through algorithmic trading?

#14
post #5

Earlier quoted context omitted.

Care 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.

I 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…

> 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

Re: Ask HN: Anyone making money through algorithmic trading?

#15

I lost about $100k doing algorithmic trading. I spent the better part of 2 years after work immersing myself in algorithmic trading, understanding the architecture of the stock market, and getting very very deep into the topic. I found an algorithm that was wildly positive, and traded it on 3 separate markets every night. I learned a lot and I love everything I learned, but it was a very expensive lesson. The #1 thin…

if you've lost 100k, you had 100k to spare. agree it was an expensive lesson.

Re: Ask HN: Anyone making money through algorithmic trading?

#16

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.

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

Re: Ask HN: Anyone making money through algorithmic trading?

#17
I wonder whether the premise of your question is faulty. If you ask enough people: "In your last 100 flips of a coin, did you get more than 60 heads?" some will truthfully say "Yes." Unfortunately, that does not mean there's anything special about their coin-flipping strategy, or that you will be able to generate a successful coin-flipping strategy.

My guess is what you really want to know is "What is my expected gain if I try to employ an algorithmic trading strategy?" I have my suspicion of the answer to that question, but I don't believe your current question will shed any light on the answer.

Re: Ask HN: Anyone making money through algorithmic trading?

#18
Short answer: yes.

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.

Re: Ask HN: Anyone making money through algorithmic trading?

#19
Not algo trading but working and learning to automate things as automation, speed and more sophisticated interfaces can help me a big deal. I made a six figures trading last year manually last year. I won't really put a light into the markets I trade and the strategies I use. But there is lots of money for small fish in this market.

Re: Ask HN: Anyone making money through algorithmic trading?

#20

Earlier quoted context omitted.

I 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…

> 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

Wow, 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.

Post reply on HN