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?

 

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.

 

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.

 
[Comment removed by mod team]
 

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. 

Persistency is Key
 
Most Helpful

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.

 

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

 

By automate I just mean more simple the script ‘automates’ tasks i would do manually, like scraping or updating. Sometimes I use task scheduler.

I work with the vendor and our IT team when spark is required and take subsets of datasets for aggregate to a level I can work with.

Again - not a programmer and not a quant to your mileage may vary. Everything ultimately moves toward excel, and towards the drivers that matter.

I very much disagree that the size of a dataset has any relationship to its potential alpha, most of my best are small. Obscurity, integrity and relevance are the primary determinants of alpha potential for my use case. I do have some datasets that could probably be better utilized with a more advanced. But there’s always something to do of course.

I wouldn’t take anything I say as advice on coding, but I only mean express that, for fundamental analysts, a little can go a long way. That said, some sectors are more data rich and some sectors trade on shorter term fundamentals vs longer term stories - on some stocks going data diving is a forest for the trees situation in my role, in others it gives a durable and reusable variant insight.

 

Consequatur veritatis veniam rem veniam qui dolores magnam et. Numquam magnam reprehenderit vero sequi aut voluptates modi. Voluptatem voluptatem facere ut nihil debitis saepe. Ea necessitatibus repellat delectus deserunt.

Velit velit quasi repudiandae commodi at sit. Quia ab rerum dignissimos dignissimos. Laudantium et deleniti natus aspernatur inventore nesciunt. Rem recusandae et eum nostrum molestiae et aut.

Career Advancement Opportunities

April 2024 Hedge Fund

  • Point72 98.9%
  • D.E. Shaw 97.9%
  • Magnetar Capital 96.8%
  • Citadel Investment Group 95.8%
  • AQR Capital Management 94.7%

Overall Employee Satisfaction

April 2024 Hedge Fund

  • Magnetar Capital 98.9%
  • D.E. Shaw 97.8%
  • Blackstone Group 96.8%
  • Two Sigma Investments 95.7%
  • Citadel Investment Group 94.6%

Professional Growth Opportunities

April 2024 Hedge Fund

  • AQR Capital Management 99.0%
  • Point72 97.9%
  • D.E. Shaw 96.9%
  • Citadel Investment Group 95.8%
  • Magnetar Capital 94.8%

Total Avg Compensation

April 2024 Hedge Fund

  • Portfolio Manager (9) $1,648
  • Vice President (23) $474
  • Director/MD (12) $423
  • NA (6) $322
  • 3rd+ Year Associate (24) $287
  • Manager (4) $282
  • Engineer/Quant (71) $274
  • 2nd Year Associate (30) $251
  • 1st Year Associate (73) $190
  • Analysts (225) $179
  • Intern/Summer Associate (22) $131
  • Junior Trader (5) $102
  • Intern/Summer Analyst (249) $85
notes
16 IB Interviews Notes

“... there’s no excuse to not take advantage of the resources out there available to you. Best value for your $ are the...”

Leaderboard

success
From 10 rejections to 1 dream investment banking internship

“... I believe it was the single biggest reason why I ended up with an offer...”