Learning Python

Hello All,

I am in ER and feel the need to learn python now. I'm sure most of you know how. Do you guys have any tips and tricks to learning? Sites? Ive taken classes on C# and am somewhat familiar with code in general. Just not very good. Any recommendations?

Hedge Fund Interview Course

  • 814 questions across 165 hedge funds. Crowdsourced from over 500,000 members.
  • 11 Detailed Sample Pitches and 10+ hours of video.
  • Trusted by over 1,000 aspiring hedge fund professionals just like you.

Comments (15)

Aug 2, 2021 - 2:32pm

Codecademy was awesome, the Python courses took me about a month or so back when it was free. It also walks you through how to download it to your computer so you can use it outside of the website. Now that they have the Pro option it may have changed a bit since I was using it but I've heard good things about Udemy and Coursera as well and am looking into brushing up on one of those. Just make sure whatever you choose is for the correct version of Python that you'll be using - there are syntax differences between Python 2 and Python 3.

Aug 2, 2021 - 2:33pm

Codecademy was awesome, the Python courses took me about a month or so back when it was free. It also walks you through how to download it to your computer so you can use it outside of the website. Now that they have the Pro option it may have changed a bit since I was using it. I've heard good things about Udemy and Coursera as well and am looking into brushing up on one of those. Just make sure whatever you choose is for the correct version of Python that you'll be using - there are syntax differences between Python 2 and Python 3.

Learn More

300+ video lessons across 6 modeling courses taught by elite practitioners at the top investment banks and private equity funds -- Excel Modeling -- Financial Statement Modeling -- M&A Modeling -- LBO Modeling -- DCF and Valuation Modeling -- ALL INCLUDED + 2 Huge Bonuses.

Learn more
  • Intern in PE - LBOs
Aug 2, 2021 - 1:15pm

If you do not have a CS background, I would suggest taking MIT's 6.001, either on OCW or edX, followed by learning the various libraries (pandas, numpy, mathplotlib, scikit learn, etc.). That should give you a good enough intro to CS background (especially OOP concepts) and you'll find learning and implementing libraries easy.

Aug 5, 2021 - 11:33pm

Don't do the WSO course (sorry Patrick and Andy, gotta say the PE course is great). Do Codeacademy for a quick bang for the buck. If you are dedicated to learning it, buy the MIT Python book. It's very comprehensive and it covers basically everything Codeacademy covers conceptually. 

Most Helpful
Aug 28, 2021 - 5:36pm

Here's how I did it, coming from a fundamental role - this isn't the way to learn robust and best-practice or efficient programming. But it's I learned python, while taking care of my work, to maximize return-on-time for my role.

Find a question in your coverage universe that can only be answered with advanced/large data collection/aggregation/analysis or a research process that seems potentially automatable - find something you'd really like to do that can't be done in excel. In other words, find something that generates alpha or saves you time.

Time spent learning/scripting is your capex, time spent on investment research/coverage is your opex. Time is your investment, alpha is your goal. Maximize return on investment.

There is so much to learn, you really need that focus of an end goal that will be useful. In my case, aggregating/manipulating data and gathering/automating data is useful.

Find a tutorial or forum thread on a similar problem/use case. Then go thru intro stuff until you can muddle through the thread/tutorial. Change items as needed for your use case - and figure it out when stuff breaks. When you're done you have new scripting knowledge and also something useful, that saved you time or generated alpha elsewhere.

Let me caveat - this is how I did it. I can do most of what I want to do, quickly now and a lot of PnL came out of the process of learning (PnL guided the process of learning). That said, I almost definitely do not do things in the 'best practice' or most efficient manner - but I don't want to be a good programmer - I don't care about that, I want to learn as little scripting as required such that I can execute any research idea or process improvement that might be useful and nothing more.

In conclusion, find a reason to learn that is worth the time and effort - that will focus you and that will secure the institutional buy in you need. Take a 'just get it done' approach.

Frankly, I'm going to piss off some CS gurus here - and this applies only to my experience and for usage in my end purposes as a fundamental analyst. Learning python/SQL was easy - I'm not a rocket scientist it was just, logical, pretty objective. The "how" came really surprisingly easy, the "what" and "why" and marrying it to fundamentals is the real difficulty - more difficult and more valuable than plain vanilla equity research or being a textbook broadly good programmer.

Plenty of people in this thread will give you better guidance on how to become the best software developer or data scientist or programmer - I defer to them, only sharing how I have (so far) tried to instead become the best fundamental analyst who is data-enabled. What I do is mostly web scraping, data aggregation/manipulation/analysis, simple automation and task scheduling. I think machine-learning would be an additional capability that would useful and perhaps as I start to learn/apply that I'll be sorry I didn't more thoroughly go through all the best-practices and conceptual foundation etc.

  • Quant in HF - EquityHedge
Aug 28, 2021 - 10:21pm

How do you automate your code? As in, you write a piece of code and then want to run it so it's automated. Airflow, Cron, etc.

Re: something that generates alpha/can't be done in excel, are you leveraging alt data/big data? E.g. did you take the time to learn pyspark/Spark? Most of those alpha generating datasets are too big for python single server

Sep 1, 2021 - 9:41pm

Ullam tempore nisi atque sint architecto labore ad. Voluptas praesentium placeat illum quia et ducimus qui. Aut blanditiis ut quo quidem. Quis asperiores consequatur vero fugiat quo. Est quisquam deleniti laudantium dolores quia aliquam voluptas voluptate.

Nesciunt repellendus voluptate vel enim. Numquam ut blanditiis eos repellendus ea. Saepe nisi doloribus debitis nostrum sit eum illum.

Start Discussion

Total Avg Compensation

September 2021 Hedge Fund

  • Vice President (19) $498
  • Director/MD (10) $359
  • NA (5) $306
  • Portfolio Manager (7) $297
  • Manager (4) $282
  • 3rd+ Year Associate (19) $272
  • 2nd Year Associate (28) $241
  • Engineer/Quant (51) $237
  • 1st Year Associate (64) $187
  • Analysts (188) $168
  • Intern/Summer Associate (15) $125
  • Junior Trader (5) $102
  • Intern/Summer Analyst (211) $82