I know, you are going to say that it is the most popular language and everyone uses it for trading. Well, they shouldn't. There isn't a month that I am around this forum that I don't get a Python developer liking himself way too much and pointing out that anyone who dares to say anything wrong about that language is a useless developer. Just let me start by saying that a proper developer would never get angry if someone criticizes a language, because we can write in many of them, and we know their flaws. But Python developers do, they get so angry when you criticize the language they use that you feel like you are talking to a cult member. But let's state the facts. Automated trading is essentially handling money; isn't that obvious? And you need a strong language. A language that won't fail you in the most basic tasks: - Lack of private attributes. You wouldn't believe that if someone told you. You can't create an attribute that is only visible to its class; everything is public. Just with that, you can stop reading. Then they don't even blink when they write articles about applying SOLID principles in Python, really? Without private attributes? - Lack of constants. Every single thing is mutable, literally, everything. Way too SOLID, isn't it? Forget about configuration attributes that should be immutable across the whole application. - Horrible indentations. Who thought that something that you can't see, like a tab, is a way to create indentation in Python? Who the hell thought about that? What is wrong with brackets or parentheses? If you have been programming long enough, you would be able to remember that there was a time when teams changed tabs to 4 spaces, or vice-versa, just do that with a Python source and you will laugh for months with all the bugs that it will generate. - Collections are an aberration. Why would you create a map when you can't select any item from it? Then you have to cast it to a list and then use it? Way too efficient! Exactly what you need for trading, inefficient algorithms. - Horrible parallelism. Do you want to use async methods? With your shittty classes without private attributes? Well, I hope you are bald already, because you are going to pull your hair. - Non-existent decimal types. There is a type that is called decimal, but it is useless. Do you want to test it? Just do this simple check. Is 0.1 + 0.3 = 0.4 ? Well, in Python it isn't. That is exactly what you want to handle pips or steps in future markets, isn't it? - Dynamic typing. That is exactly what you want, isn't it? For trading algorithms, you declare an attribute that can contain several types; it will all look fine at the syntax level, but then it will blow right in your face when you run it and change a value. That is exactly what you want when you are handling money, isn't it? Want some more details about this: https://drmarkclewis.medium.com/the-struggle-of-dynamically-typed-languages-ef91a87164a1 - Versioning. Do you want backwards compatibility from versions 3 to 2? Well fuck off. You don't get it. It is obvious that any language that wants to call itself a professional language should have backwards compatibility, not Python. Now, do you know why Python is popular? At the time, Google had to use a different language to get rid of Java, mainly because of its arguments with Oracle. The creator of Python worked as a Google developer, which is why it became popular; Google made it popular. At that time, C++ was a mess, even said by Stroustrup. So the company had to write a wrapper around it. But then C++ evolved with a very strong standard. It became the standard for many operating systems and evolved into versions that are reliable and strong, especially for trading! But what do they use now at Google? Not Python, dear, when they saw the monster they created, they immediately moved to another language, like Go or Carbon. Of course they did. Watch the interview from Lex Freedman with the creator of Python, and pay attention when he describes when he had to go to Dropbox to fix their code. A never-ending block of spaghetti where you would get a wrong tab, and you would pray to any god you know. Python is for small scripts that don't require any proper software development. The minute you try to do something complex and the project gets bigger, you end up fighting with the language. The main reason why many people use Python is that they don't know any better, and they keep copying code from someone else. Especially now that AIs vomit a bunch of Python code every time you ask them for any coding advice. Now, wait until a bunch of Python developers jump to this thread and call me every name they know, but I only wrote this post because I can link to it the next time I have to. Please don't use Python for your sanity and peace of mind.
Criticism: Python has no true private attributes; everything is public. Counterpoint: Python uses name mangling (__attribute) to discourage access to internal attributes. It’s not bulletproof, but it’s intentional: Python trusts developers to be responsible. This is part of Python’s “consenting adults” philosophy—you’re expected to respect boundaries, not be forced by the language. SOLID principles can absolutely be applied in Python. Encapsulation is about design discipline, not enforced access modifier Criticism: Everything is mutable; no way to define constants. Counterpoint: Python supports immutable types like tuple, frozenset, and str. Constants are conventionally written in UPPERCASE, and tools like mypy or linters can enforce immutability. For stricter control, use typing.Final (Python 3.8+) or third-party libraries like enforce ✅ Example: from typing import Final MAX_USERS: Final = 100 Criticism: You can’t select items from a map (dict) without casting. Counterpoint: Python’s dict is highly efficient and supports direct access: 5. “Horrible Parallelism” Criticism: Async is painful, especially with Python’s class model. Counterpoint: Python’s asyncio is robust and widely used in production (e.g. FastAPI, Discord bots). For CPU-bound tasks, use multiprocessing; for I/O-bound, use asyncio or concurrent.futures. Libraries like trio, curio, and anyio offer elegant async models. Python’s GIL is a known limitation, but not a blocker for scalable async apps. ✅ Example: import asyncio async def fetch_data(): await asyncio.sleep(1) return "Done"
The interesting thing about programming languages is that their ecosystems (software & people) become moats. So no matter how flawed the language is people are going to stick with it, and you're going to be fighting an unending fight trying to change it. Not trying to either deride or defend Python, I program in C# and C++ almost all the time.
This is the usual level of a Python developer, they can't produce a reply by themselves, they ask an AI and copy what it vomits.
LOL another language purist. If you program enough you should know every language has its place. Go and ask around and you will realise a huge number of top tier trading firms use python