Live data from Hacker News

Case study: Algorithmic trading with Go

polygon.io

81–90 of 311 posts

Re: Case study: Algorithmic trading with Go

#81

QQ for everybody since OP is using IB API which is notoriously bad that many wrappers have been written for it (ib-insync). This is a general question, I'm wondering is there any good framework/wrappers out there that one can learn from to code up a complex trading application? Like dealing with all the asynchronous nature of process/submitting trading and quotes messages.

I use ib-insync with asyncio and it is surprisingly easy, the most difficult is order management. Jason Brownlee’s SuperFastPython was the most approachable asyncio explanation I found.

Re: Case study: Algorithmic trading with Go

#82
post #79

Earlier quoted context omitted.

I think you would still end up with races, they'd just move around. IEX's "speed bump" was just marketing and didn't really matter to actual HFTs. Plus, some of it is unavoidable if you don't have a single unified exchange. Where there's latency, there's inefficiencies, and where there's inefficiency, there's profit to be made. And competition among exchanges is healthy for the ecosystem, so I don't think we'd want t…

Why is competition among exchanges a good thing? Why not a single, very regulated, exchange which serves as a neutral playing field?

Single point of failure is a simple justification right off the top of my head. What happens if you have a critical failure that brings down an exchange for several days?

Re: Case study: Algorithmic trading with Go

#83
post #57

also having worked in the space: HFT should not exist. Break up the day into segments and have a single crossing. Do it every five minutes or whatever for sufficient timeliness. the millisecond race does not make anything better for anybody except the people doing the trading.

...that's kinda entire stock exchange.

It could be all run once a day if it was just to give ability to raise funds via investment

Re: Case study: Algorithmic trading with Go

#84

Earlier quoted context omitted.

Not only are the platforms table stakes they are the more straightforward part to build. Even at the bleeding edge of latency you can usually work your way to the limits of your platform budget without having to find anything novel. The strategies though are where the discovery is. There are a few strategies that are well known and still profitable but those are largely consolidated to the biggest firms. For everythi…

"they are the more straightforward part to build" More straightforward, heh, sure. But still damnably complicated. Which just goes to show how much money and how much engineering talent is invested in this world that these things are so taken for granted.

So many intelligent people applied for something that has no value whatsoever to humanity regardless of how you look at it.

Re: Case study: Algorithmic trading with Go

#85
post #3

Slightly related: when running 3 screens like that, put the middle (primary) one in landscape, so the array is like a big H. It works better for videos and code, IMO. You still have two huge portrait fields for documentation/webpages/etc, or 8 portrait-oriented quarters. I usually run 8 portrait-shaped windows quartered on the sides, then two side by side on the middle, which are each approximately square. I don't li…

Eh, honestly only thing horizontal is good for is media, any documents/code is better in narrower vertical columns.

Honestly my perfect screen for work would probably had something like 1:1 ratio, so I can have 2 nice columns of code that are tall enough that can be split horizontally if needed while still being useful.

Re: Case study: Algorithmic trading with Go

#86
post #79

Earlier quoted context omitted.

I think you would still end up with races, they'd just move around. IEX's "speed bump" was just marketing and didn't really matter to actual HFTs. Plus, some of it is unavoidable if you don't have a single unified exchange. Where there's latency, there's inefficiencies, and where there's inefficiency, there's profit to be made. And competition among exchanges is healthy for the ecosystem, so I don't think we'd want t…

Why is competition among exchanges a good thing? Why not a single, very regulated, exchange which serves as a neutral playing field?

Lower fees.

Also, "exchange competition" is a thing in US stocks, but not, for example, in the futures' market. And there's HFTs in futures too, so having a single exchange wouldn't "remove" HFTs (not that you'd want to).

Re: Case study: Algorithmic trading with Go

#87

I see the new bull market is bringing back these kinds of articles.

Yeah, I've been messing around with this for 4+ years so. Got to see COVID nose dive, meme stocks, massive build up, market taking a dump, bank collapses, and now a bull run again. I have no idea if it was always like this but it has been in insane.

Re: Case study: Algorithmic trading with Go

#88
post #72

Earlier quoted context omitted.

That makes sense to me and lines up with what buffet says about there are alot of people on wall street who can average 50% returns with 100k but once it gets into the millions it is much harder to find alpha.

I don't follow Berkshire Hathaway much, so I'm not aware of what Warren Buffet has said on this topic, but it sounds super interesting. After a bit of digging, I found this Q&A from the 2019 shareholder meeting: https://www.youtube.com/watch?v=geRIJQJXRVo&t=17980s And the meeting minutes in PDF form (see page 120, question #32): https://s3.amazonaws.com/static.contentres.com/media/documen... The text from that docume…

So flip houses and do the work myself?

Re: Case study: Algorithmic trading with Go

#89
post #84

Earlier quoted context omitted.

"they are the more straightforward part to build" More straightforward, heh, sure. But still damnably complicated. Which just goes to show how much money and how much engineering talent is invested in this world that these things are so taken for granted.

So many intelligent people applied for something that has no value whatsoever to humanity regardless of how you look at it.

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 much top talent was being pulled away from productive tasks to essentially wank around. Not just technologists either, but all sorts of mathematicians and scientists were drawn to the flame.

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. It’s enough to make one want to give up on capitalism, except that everything else appears to be worse.

Post reply on HN