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?
WSO has courses for this
WSO Machine Learning Package - NEW | Wall Street Oasis
Machine Learning for Finance Python Fundamentals | Wall Street Oasis
Applied Machine Learning Course Overview | Wall Street Oasis
It’s been a while but I originally learned on Codecademy. You could also try Udemy or Coursera.
Did you learn well? How long did it take?
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.
Codecademy and personal projects. Easiest to learn by doing. Gradually integrate it into your workflow and it'll come, baby steps is the name of the game.
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.
Do you need to know how to code to get a job at a HF these days?
I believe you need to clarify what strategy you are referring to first.
Fundamental long/short equity and event driven
Book: 'Python Workout: 50 ten-minute exercises' by Reuven M. Lerner.
Videos: https://www.datacamp.com/
(For reference, I have been coding in Python for > 10 years.)
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.
See All Comments - 100% Free
WSO depends on everyone being able to pitch in when they know something. Unlock with your email and get bonus: 6 financial modeling lessons free ($199 value)
or Unlock with your social account...