Live data from Hacker News

Lessons learned building an ML trading system

tradientblog.com

71–80 of 160 posts

Re: Lessons learned building an ML trading system

#71

Is this the author? I would love to know how this fared recently in the large sell-off. What he says about some markets possibly being predicable rings true to me. But the article was far from convincing that the BTC market is actually predicable. The natural assumption should be that the author was in the right place at the right time. Although he went through great lengths, I'm not convinced this is anything other…

Author here. Let's assume you cannot got short (which you can't in most crypto markets) and can only make money when the market goes up. The best you can do is avoid losing money when the market goes down. But there are no pure market downturns. On a daily scale the market may be down, but that does not mean that on a millisecond or second-scale you will only see downward movement. There is just an overall downtrend,…

How do you maintain a market neutral portfolio without the ability to go short? Also I would be interested in hearing about your Sharpe ratio. Thanks! Great article!

Re: Lessons learned building an ML trading system

#72
post #38

Earlier quoted context omitted.

> Best we could tell someone was front running us due to an artificial delay for our account (delay between trades went to ~20ms up from our prior steady speed of 3-7ms) and/or a bunch of the trades in the orderbook were bogus. I wouldn't be surprised, given that traditional HFT companies are building cryptotrading desks and they have a lot more capital to play with too.

You can't simply front-run someone else by having deep pockets. The only way that is possible is if you gain privileged information about that person's orders before they actually hit the book. The most practical way to do this is to be the exchange.

Or to pay the exchange a large sum to get privileged access :)

Re: Lessons learned building an ML trading system

#73

After having spent an insane amount of time in late 2017/2018 building an HFT bot for Binance I can say this is a pretty solid article. In our case we were doing triangle trading between BTC/ETH/USDT pairs and had our buys/sell delay down to 3-7ms. At one point moving 0.3-0.7% of Binance’s daily volume. Few notes: * Finding an objective point of truth for value when all of the currencies are floating is hard but vita…

What's the value of HFT? If exchanges were required to add a random delay to very trade to work against high frequency traders, would anything of value be lost?

As sibling said, it's liquidity. Worked at an HFT for a while, and they once got in a snit with an exchange over some policy change. They turned off their trading there one morning, and within 20 minutes, the exchange was on the phone begging them to come back.

Re: Lessons learned building an ML trading system

#74
post #71

Earlier quoted context omitted.

Author here. Let's assume you cannot got short (which you can't in most crypto markets) and can only make money when the market goes up. The best you can do is avoid losing money when the market goes down. But there are no pure market downturns. On a daily scale the market may be down, but that does not mean that on a millisecond or second-scale you will only see downward movement. There is just an overall downtrend,…

How do you maintain a market neutral portfolio without the ability to go short? Also I would be interested in hearing about your Sharpe ratio. Thanks! Great article!

You can't go short but you can still hedge your exposure by going on short on something very correlated - like Bitcoin futures. I do this manually depending on how much capital I'm trading.

I actually have no idea what my Sharpe ratio is, sorry. With the system constantly changing, data formats changing, exchange balance apis changing, and accurate monitoring already being a challenge in itself, it's very difficult to keep track of exact returns and historical data. I could probably calculate it if I spent several days (weeks?) trying to process all my historical trade data, but that would be a waste of time for me personally.

Re: Lessons learned building an ML trading system

#75

After having spent an insane amount of time in late 2017/2018 building an HFT bot for Binance I can say this is a pretty solid article. In our case we were doing triangle trading between BTC/ETH/USDT pairs and had our buys/sell delay down to 3-7ms. At one point moving 0.3-0.7% of Binance’s daily volume. Few notes: * Finding an objective point of truth for value when all of the currencies are floating is hard but vita…

> the orderbooks were slightly different between bots As somebody who still runs a profitable bot on Binance I find this hard to believe. Also all order book related endpoints/streams are public, so queries/subscriptions are not tied to a specific account.

In late 2017/early 2018 when their websocket was new I believe you had to be authenticated for either the initial order book query or the websocket subscription. Either way since we always locked our api keys to our IPs it wouldn't have mattered.

Re: Lessons learned building an ML trading system

#76
This post is an exemplar of the crucial relationship between domain-specific knowledge and ML competency in the ML space. The bulk of the post is detailing the tricky ins and outs of trading, and overall the author gives the impression that they're broadly knowledgeable about stock markets.

Contrast this post with those you see with ML hobbyists who delve into medicine or fake-news and produce useless results testament to their lack of domain-specific competency.

Re: Lessons learned building an ML trading system

#77

Earlier quoted context omitted.

What's the value of HFT? If exchanges were required to add a random delay to very trade to work against high frequency traders, would anything of value be lost?

Many HFT systems provide liquidity. If there is no liquidity, retail investors like you or me cannot buy or sell. Just imagine you want to exchange a currency because you go traveling and the exchange tells you "Sorry, nothing available right now, gotta come back in a few weeks". That's what would happen if there is no liquidity.

It isn't obvious that the retail investors are that excited by sub-second liquidity.

Speaking personally, I'd even be happy to wait several seconds to see if someone else is willing to pay a better price.

Re: Lessons learned building an ML trading system

#79
post #77

Earlier quoted context omitted.

Many HFT systems provide liquidity. If there is no liquidity, retail investors like you or me cannot buy or sell. Just imagine you want to exchange a currency because you go traveling and the exchange tells you "Sorry, nothing available right now, gotta come back in a few weeks". That's what would happen if there is no liquidity.

It isn't obvious that the retail investors are that excited by sub-second liquidity. Speaking personally, I'd even be happy to wait several seconds to see if someone else is willing to pay a better price.

That's not how things work. You would see much less demand/supply for a particular stock at every price level, which means you'd pay much more to buy less and would have to pay much more to sell less also. There are no upsides to having fewer market makers.

Re: Lessons learned building an ML trading system

#80

Earlier quoted context omitted.

What's the value of HFT? If exchanges were required to add a random delay to very trade to work against high frequency traders, would anything of value be lost?

Many HFT systems provide liquidity. If there is no liquidity, retail investors like you or me cannot buy or sell. Just imagine you want to exchange a currency because you go traveling and the exchange tells you "Sorry, nothing available right now, gotta come back in a few weeks". That's what would happen if there is no liquidity.

I always had questions about the liquidity on offer though seeing participants flee the market in black swan events. HFT liquidity could be illusionary - its only there when its not quite required similar to how the bank "only offers you a loan when you don't need one". Of course this is exactly the point when liquidity is required; normally there's sufficient liquidity in normal times from market participants. Its easy to offer liquidity in normal times; harder to do so when no one else wants to offer it.
Post reply on HN