Live data from Hacker News

Case study: Algorithmic trading with Go

polygon.io

181–190 of 311 posts

Re: Case study: Algorithmic trading with Go

#181

Earlier quoted context omitted.

Seems more pointless than crypto to be honest.

And like crypto, feel free to ignore it instead of making things you don’t like illegal.

Dont make scams illegal just because you don't like them!

Re: Case study: Algorithmic trading with Go

#183
post #130
post #128

Earlier quoted context omitted.

It was my (admittedly ignorant) impression that C++ was preferred over garbage-collected languages because you'd be more likely to avoid GC pauses. Yes, of course I know that Go's is super efficient, but if you're doing a million trades a day even a tiny percentage of slowdowns that would be otherwise preventable could be a career-limiting move. Am I just behind the times?

I think you're right! Go will never beat C++ in this aspect. I used Go because that's what I knew and for the non-professional trading I was aiming, C++ wouldn't have made much difference. My bottlenecks were network (1s+ per trade roundtrip) and chaotic unreliable crypto markets. Just note that Java is used in HTF, but it's a different beast than our average CRUD Java. For example this article states: "Essentially,…

Ah, relief. Thanks for answering. At your volume Go makes perfect sense. Love your project!

Re: Case study: Algorithmic trading with Go

#184
post #161

Earlier quoted context omitted.

Seems more pointless than crypto to be honest.

It's quite a statement. You're almost saying capitalism and efficient markets are pointless. Maybe they are, but I think it's nothing like crypto. In the old days before HFT, you weren't sure you'd get the best price. You'd have to rely on a broker to make sure that happens, but as a retail trader you generally got a worse price/out of date price. Nowadays with HFT you can get pretty much the best price anywhere. Tho…

> You're almost saying capitalism and efficient markets are pointless.

Capitalism necessitates efficient markets (and efficient markets necessitate HFTs) so any criticism of HFTs is a direct criticism of capitalism as well. I mean this isn't really a problem that's specific to HFTs -- there are just a lot of jobs that we can perceive as providing no value or even negative value (jobs that are possible specifically due to capitalism e.g. payday loans, 2008 style trading, certain scams or predatory practices etc.)

I think we can all agree that this is a flaw, and we're not criticizing capitalism to replace it with something else, but rather just recognizing this as a problem. At the end of the day, a useless job is a useless job even if it exists solely because of capitalism.

Re: Case study: Algorithmic trading with Go

#185
post #89

Earlier quoted context omitted.

Essentially yes. When I worked in algo trading, it never bothered me that we were extracting profits from the markets, nor that we served little social good. It felt like a step up from where I’d been before (being told that we were making the world a better place, when every engineer knew otherwise.) At least we weren’t making things obviously worse. What did bother me, and was acknowledged by my coworkers, was how…

> We as a society have managed to allocate so many of the “best and brightest” to either fintech wankery or placing ads in front of eyeballs. Those things have driven a load of proprietary and open source tech that helps everyone else.

Rising levels of inequality would suggest this is false.

Re: Case study: Algorithmic trading with Go

#186
post #161

Earlier quoted context omitted.

Seems more pointless than crypto to be honest.

It's quite a statement. You're almost saying capitalism and efficient markets are pointless. Maybe they are, but I think it's nothing like crypto. In the old days before HFT, you weren't sure you'd get the best price. You'd have to rely on a broker to make sure that happens, but as a retail trader you generally got a worse price/out of date price. Nowadays with HFT you can get pretty much the best price anywhere. Tho…

[deleted]

Re: Case study: Algorithmic trading with Go

#187

Earlier quoted context omitted.

Your dismissals seem to be very biased and you’re not allowing the possibility of being wrong. As a practitioner who worked on the systems you’re citing I can tell you’re wrong on many fronts. As far as costs are concerned, you’re not answering the most relevant question that applies to most users of this forum: costs to retail traders, and are only tackling the institutional side of things. Nobody from retail concer…

I’m a practitioner and no, the costs to retail traders is included and analyzed. The most vocal critics of HFT are very often previously practitioners who are upset when their strategies and models becomes obsolete are are outwitted by even more efficient operators. Give any example of where you are going? I will say RegNMS and NBBO regulations are actually preventing even further efficiencies. Dark pools and off exc…

By the way, your description of profits dropping for market participants reminds of the concept you may find interesting.

Here’s an example of P&L dynamics:

At time t, your throw an unbiased coin. If it comes out heads your wealth multiplies by 0.6 with probability 0.5, or if it comes up tails, your wealth multiplies by 1.5 with probability 0.5.

Now you could simulate this process and take two averages. One is an ensemble average, averaging over many trajectories (of many participants) at a pre-defined time step t.

The other average is a time average (what happens to a a single trajectory picked at random over time). You may find the result interesting and close to what you’ve just described. This result is because of the process being non-ergodic; but it exhibits a few “winner takes all” and has nothing to do with the properties of the winners. It is a purely random property. An illuminating exercise. There are quite a few other results like this one from the field of stochastic processes that relate volatility bounds to your expected P&L, etc.

Re: Case study: Algorithmic trading with Go

#188

Earlier quoted context omitted.

I’m a practitioner and no, the costs to retail traders is included and analyzed. The most vocal critics of HFT are very often previously practitioners who are upset when their strategies and models becomes obsolete are are outwitted by even more efficient operators. Give any example of where you are going? I will say RegNMS and NBBO regulations are actually preventing even further efficiencies. Dark pools and off exc…

I am not disagreeing with you that the costs are dropping and that participants benefit from that. In fact I agree. Your projection that I find the field unfair is also unfounded. I love the field and find it immensely interesting. I just don’t take mythology surrounding it at face value because I often found it to be a) outdated b) full of mythology but no hard data. What I am saying is that the thesis that the cost…

It’s true I’m US centric. What I do know about European equities market structure actually points to one specific problem that actually we also have some of in the US. I’d suggest you look at clearing house collateral regulations, especially around ETF transactions, creation and redemption, and posting of OTC positions. That part of the system, which btw isn’t HFT, is very very shady.

I agree it’s all quite understandable if people had the resources available. I would argue part of the reason it is opaque is the fears of operators that too much public attention can bring a lynch mob. This business can literally be one of the most profitable activities on the planet, but contrary to populist sentiment this is not evidence of wrong doing, it’s simply because it’s so automated and scalable and all electronic.

Back to ATS and dark liquidity, this isn’t as trivial to explain as you suggest, it requires understanding of flow toxicity and information theory to be understood completely. You must know that in markets, transactions can be beneficial to both parties as they have different objective functions and timescales.

What evidence can be presented that supports the idea HFT operators are extracting increasing costs on the system? I’m not aware of any.

Re: Case study: Algorithmic trading with Go

#189
For those that are interested in algorithmic trading - take a look at Collective2. Where engineers make available their buy/sell signals for a subscription fee.

It's like the minor leagues for algorithmic trading. It's fascinating.

The system keeps track of the gains/losses, so no cheating on the reporting.

You can authorize Collective2 to access your Interactive Brokers account, so that the trade signals are managed on your behalf.

It's been around for at least a decade, so you can see some longstanding performance numbers, but most systems just don't last that long.

https://collective2.com/leader-board

None of the leaders have been there for very long. One to two years. Showing that most system's alpha disappears fairly rapidly.

The equity curves are sporadic ~a few of the trades accounting for a majority of the gains.

Re: Case study: Algorithmic trading with Go

#190

I worked in HFT for a while. I find the whole space fascinating. I'm glad OP found similar thrills. "This aspect, the platform itself, seems to be often overlooked in most discussions. Many conversations revolve around strategies (mean reversion, trend following, linear regression, etc.), and backtesting, without fully addressing the practical mechanics or logistics of strategy implementation, particularly in the con…

Fascinating. Thanks for sharing.
Post reply on HN