Readit News logoReadit News
82716f12 commented on HRT's Python fork: Leveraging PEP 690 for faster imports   hudsonrivertrading.com/hr... · Posted by u/davidteather
ActorNightly · 7 months ago
Right, exactly what I said. They don't make money by market making. They make money by charging transaction fees, and on an access basis to their "algorithms" which are designed against analyzing the complex futures that they are the market maker for.

The incentive for users to sign up with them is to get access to "better" pricing for whatever commodity they pair the buy/sell orders for - but remember these are futures so its all betting, and so the algorithms don't really mean anything.

82716f12 · 7 months ago
My understanding of these firms is limited too, but I’ve never heard of market makers charging transaction fees.

Isn’t it actually the opposite? they pay for order flow instead? They should be making money from bid-ask spread, not fees.

82716f12 commented on HRT's Python fork: Leveraging PEP 690 for faster imports   hudsonrivertrading.com/hr... · Posted by u/davidteather
ActorNightly · 7 months ago
You can have one module with all the capability, but the capability is separated into submodules. And the __init__.py of the module doesn't auto import the submodules

So when you do this

    import bigmodule
It doesn't do anything functionality, and you may only have some small top level things available for you, like bigmodule.config, or bigmodule.logging.

Then, you have your big initializer code in bigmodule.financedata. But the stuff you need for running scripts is in bigmodule.scripts.

So when you write

   from bigmodule import financedata
This code will take a while.

But if you write

   from bigmodule import scripts
This will load fast.

You don't need to have gazillion modules, just good organization. Also, in general, its a good practice to gate intensive compute/network operations behind an explicit function you need to call.

Also thank you for focusing the convo on the tech stuff instead of repeating finance bro myths

82716f12 · 7 months ago
That sounds good in theory, but I haven’t come across a codebase that’s really optimized and free of unnecessary imports, especially in large companies.

And when you have to depend on external libraries beyond your control, how do you typically handle those situations?

82716f12 commented on HRT's Python fork: Leveraging PEP 690 for faster imports   hudsonrivertrading.com/hr... · Posted by u/davidteather
ActorNightly · 7 months ago
No, they are a liquidity provider. Liquidity providers only make money when there are imbalances in the market. Notionally because markets tend to drive fast towards efficiency, you can't realistically make money just being a market maker.

So then, you have to offer additional services. HRT has the SDP that they provide, and of course charge fees for. But then the question is why would anyone do this, versus just going through any other financial institution.

The answer is basically all up on their website

"As a liquidity provider, HRT develops automated trading algorithms designed to provide the best prices to our clients".

The question that should be asked is as a user, why would I want to sign up with HRT or any similar financial company? The answer for HRT is because you want to have access to more complicated financial derivatives - you don't need to sign up and pay fees to buy basic stock.

So they promise that their algorithms give the user the best price, which is a legal way of saying that you will pay less for a certain asset and make money on it, and you can't say that because you can't guarantee this.

And its well known that nobody ever gets rich of an algorithm in finance unless you are well established large firm intricately tied with the government that can move so much money as to influence trading.

82716f12 · 7 months ago
Being a market maker vs "We have a fancy trading algorithm that statistically is never going to outperform just buying VOO and holding it, but the thing is if you get lucky, it could" are two very different things lol

Moreover, I would be very surprised if the majority of their $8 billion annual profit came from client market making.

82716f12 commented on HRT's Python fork: Leveraging PEP 690 for faster imports   hudsonrivertrading.com/hr... · Posted by u/davidteather
ActorNightly · 7 months ago
>Runtime imports are a maintenance nightmare and can quickly fragment a codebase

I agree, which is why you should design your modules correctly and import only the stuff you need.

I was pointing out that lazy imports vs runtime imports in functions are basically the same and lead to the same issues.

82716f12 · 7 months ago
> I agree, which is why you should design your modules correctly and import only the stuff you need.

How do you achieve this without making gazillions of modules, where each module has just a few stuff?

Are you saying just use local import everywhere?

82716f12 commented on HRT's Python fork: Leveraging PEP 690 for faster imports   hudsonrivertrading.com/hr... · Posted by u/davidteather
ActorNightly · 7 months ago
Man from all these responses, so many people are unaware of the finance world, lol. Or just bots posting for HRT

In case you are unaware - very single trading firm makes money on fees, not by outperforming the market. This goes for firms like Vanguard too.

Just think about it for a little bit - if you could reliably outperform the market by any % with an algorithm why even start a company? Just take out loans, invest, make money, repeat and become rich. No expenses to manage a company.

82716f12 · 7 months ago
HRT is a prop firm, which means they don't have outside investors. They invest their own money like you said, no income from fees. You just proved that you have no idea what you are talking about.
82716f12 commented on HRT's Python fork: Leveraging PEP 690 for faster imports   hudsonrivertrading.com/hr... · Posted by u/davidteather
ActorNightly · 7 months ago
>Python devs at HRT really know their stuff.

Its a finance firm - i.e scam firm. "We have a fancy trading algorithm that statistically is never going to outperform just buying VOO and holding it, but the thing is if you get lucky, it could".

Scammers are not tech people. And its pretty from their post.

> In Python, imports occur at runtime. For each imported name, the interpreter must find, load, and evaluate the contents of a corresponding module. This process gets dramatically slower for large modules, modules on distributed file systems, modules with slow side-effects (code that runs during evaluation), modules with many transitive imports, and C/C++ extension modules with many library dependencies.

As they should.

The idea that when you type something in the code and then the interpreter just doesn't execute it is how you end up with Java like services, where you have dependency injection chains that are so massive that when the first time everything has to get lazily injected the code takes a massive amount of time to run. Then you have to go figure out where is the initialization code that slows everything down, and start figuring out how to modify your code to make that load first, which leads to a mess.

If your python module takes a long time to load, this is a module problem. There is a reason why you can import submodules of modules directly, and overall the __init__.py in the module shouldn't import all the submodules by default. Structure your modules so they don't do massive initialization routines and problem solved.

Furthermore, because of pythons dynamic nature, you can do run time imports, including imports in functions. In use, whether you import something up at the top and it gets lazily loaded or you import something right when you have to use it has absolutely no difference other than code syntax, and the latter is actually better because you can see what is going on rather than the lazy loading being hidden away in the interpreter.

Or if you really care, you can implement lazy work process inside the modules, so when you import them and use them the first time it works exactly like lazy imports.

To basically spend time building a new interpreter with lazy loading just to be able to have all your import statements up at the top just screams that those devs prefer ideology over practicality.

82716f12 · 7 months ago
> "We have a fancy trading algorithm that statistically is never going to outperform just buying VOO and holding it, but the thing is if you get lucky, it could".

How they make $8B/y underperforming VOO?

Reference: https://www.businessinsider.com/hudson-river-trading-hrt-8-b...

u/82716f12

KarmaCake day9August 8, 2025View Original