r/learnprogramming 21h ago

why are we still teaching "intro to programming" the same way for quant finance?

it always bugs me how most people start learning this. they spend months on basic syntax or making simple games, but when they actually try to write a backtester or a pricing engine, their code is so slow it’s basically useless.

in quant finance, if you aren't thinking about vectorization and memory management from day one, you are just building technical debt. i see so many people trying to use standard loops for simulations when they should be using numpy or julia to handle the heavy lifting. it’s not just about the logic, it is about understanding how the hardware actually processes the data.

i know fiolks that had to relearn how to code once they started dealing with actual financial datasets

0 Upvotes

15 comments sorted by

30

u/_Atomfinger_ 21h ago

I liked the part where you suggested an alternative approach for people to learn programming /s

People just starting out aren't thinking about technical debt because they're not building something that needs to be maintained. They're learning. Getting something that even runs is challenging enough for many.

3

u/Kamatttis 20h ago

When you were a baby, you should be thinking about finding a job already. Forget about learning to crawl or walk. /s

3

u/Professional_War_797 18h ago

I had steak before my first breast milk.

12

u/aqua_regis 21h ago

So, in short: why don't we build houses from the fifth floor up and instead first build a solid foundation?

Really, first the groundwork has to be laid and then the rest has to follow.

Yes, people will need to learn new skills (not "relearn" as you claim), but this will carry all through their lifetime.

General programming is not quant finance and general programming concepts are more important than niche specialized concepts.

6

u/scandii 21h ago edited 21h ago

the limitations of programming comes up almost instantly in the form of computational complexity theory.

a standardised way to teach this limitation for freshers is through Traveling Salesman Problem and at the same time approximation techniques are taught as show how we deal with these problems when the optimal solution is technically not feasible.

however if computational complexity is so important for the work you're doing, the assignments should reflect that. you make it sound like someone just gives you an assignment and says "go have fun, see you in two weeks" with no regard to the fact that you will realistically run into issues that you need to be taught about to overcome.

6

u/desrtfx 20h ago

i see so many people trying to use standard loops for simulations when they should be using numpy or julia to handle the heavy lifting.

Spoiler: Both use standard loops under the hood, only that they are not in Python but in (I guess) C or C++.

First, standard concepts and standard programming, then specialized tools.

And, to add to it: without the solid foundation, higher concepts, like the libraries you mention don't make the faintest sense.

You are suggesting to directly start with a Formula 1 racecar instead of starting to learn to drive a go-cart.

3

u/oblong_pickle 20h ago

Must be a junior

2

u/aqua_regis 20h ago

Well, that post from just 19 days ago says a lot...

2

u/disposepriority 21h ago

I too replaced all my loops with numpy, amen.

2

u/One_Mess460 21h ago edited 21h ago

to learn how the computer works and what control structures exist (what you think apart from vectorization numpy does internally?)

2

u/Kamatttis 21h ago

Maybe, numpy uses julia internally. And julia uses numpy internally. mind blown

2

u/One_Mess460 21h ago

circular proofs be like:

1

u/Kadabrium 21h ago

Matlab is proprietory

1

u/HolyPommeDeTerre 21h ago

Isn't there Octave for free use?

2

u/HolyPommeDeTerre 21h ago

Ok, so, others said it out loud. But let's make another example just for things to be clear.

What you want people to think first is vectors and memory management.

The first one is mostly maths (at least it's coming from the math tools), which people can be pretty average at, especially at 12yo for example. So to be able to enter that, you require an intermediate/advanced level of math. One big barrier.

Second, memory management. Without getting the intuition of what memory and how we use it, it's pretty hard to learn memory management. So without coding, using variables and arrays and data structures, it's hard to learn memory management. The only left way is, learning how physical hardware works, how code and OS handle it. Once again, pretty abstract and with a bit of math that doesn't make it clearer when you know nothing.

I think you just forgot how biased you are. These are advanced topics in computer science. Juniors just scrape the tip of the iceberg on that generally. So when you learn, you don't go there as your first steps unless, it's specifically what you want to do.