“Used properly, Python is not slower than C++”


When it comes to writing quick and effective code, it’s a matter of programming concepts and of libraries, not of language. 

C++ is probably one of the “purest” object oriented language used by quants today. It’s got a number of concepts like multiple inheritance that can be incredibly powerful. But I’ve seen people using it as a procedural language as well, and that’s not really helpful.

Python is far from just a great prototyping language. Its key strength is its extensive and powerful libraries used for numerical and statistical calculations. For example, I can generate a VaR timeseries in but a single line.

As with C++, you can do horrible things to it – programmers from an IT background keep iterating over matrices instead of using vectorized functions. Used properly, it is not materially slower than C++.

Neither language comes without risks either. For Python it’s a lack of strong typing whereas C++ has the unique capability of producing memory leaks.

What makes Python stand out to me however is the ability to use the same language throught the quantitative process, all the way from research to production. If I can get my hands on some top-notch C++ quants, great. If I have to choose between the risk of weak typing and IT guys recoding models in C++ without a clue what they are doing, I will choose weak typing any day.

Click here to create a profile on eFinancialCareers. Make yourself visible to recruiters and find a career in technology and finance.

Have a confidential story, tip, or comment you’d like to share? Contact: alex.mcmurray@efinancialcareers.com in the first instance. 

Bear with us if you leave a comment at the bottom of this article: all our comments are moderated by human beings. Sometimes these humans might be asleep, or away from their desks, so it may take a while for your comment to appear. Eventually it will – unless it’s offensive or libelous (in which case it won’t.)

Photo by cottonbro studio: https://www.pexels.com/photo/hands-typing-on-a-laptop-keyboard-5483149/



Source link

Share

Leave a Reply

Your email address will not be published. Required fields are marked *