Corporate Finance and Python: Early Learnings

Early Learnings on using Python in an FP&A Context

Finance people spend a lot of time with Excel. In the five or so years I have worked in finance, I spent a LOT of time in Excel. And mostly, it’s been a very happy, blissful, relationship. I dutifully learned all the keyboard shortcuts in my investment banking years, picked up a lot of practical tips from more seasoned mentors on the FP&A side, and now I can data table and SUMIFS(INDEX(MATCH)) with the best of them.

Somewhere along the way though, I heard of a new tool getting used in finance-adjacent contexts. It seemed very popular among data science folks, and had long been popular for developing real-deal software (Instagram and YouTube, for example.) It was called Python.

I started very casually tinkering with it when deal flow dried up in the Spring of 2020, and returned to learning it in earnest late last year. And friends, it is really interesting. It has tradeoffs as any tool does, but if you have ever wished your work was more reliable, more scalable, and easier to manage when things get complicated, I highly recommend you look into it.

Who is this for?

Most people that work in finance. More specifically, if your job involves analyzing data, modeling, or forecasting, I think Python makes a compelling case for your toolbox. Quantitative finance folks have already made extensive use of Python for years. Some of the best Python programs out there were developed at hedge funds you would probably recognize. But in corporate finance there seems to be little appetite for granting Python the same status that we give to Excel and other data tools like PowerBI and Tableau.

Now, I know you might be thinking, “Trey, I don’t know how to program, isn’t learning Python a lot of work?” To you I say yes, it will take work, and it will be annoying, but you have two big advantages right from the start:

  1. Any semi-advanced finance work in Excel is already programming, which you probably can do in your sleep
  2. As a finance person, you understand better than almost anyone else what analysis actually matters

Both of those points deserve unpacking, but you’re a busy professional, so let’s move on to discuss the “so what.”

What exactly can I do with Python?

The honest answer is pretty much anything you can do with Excel, plus quite a bit more. Here are some examples that I think are 1) pretty cool and 2) pretty accessible to a beginner:

This is just a few examples of low hanging fruit. There is a lot more you can do without being a programming genius by any stretch. And thanks to the hard work of generous developers, much of it is totally free and open source, even for commercial use.

Can’t I just do that in Excel/Tableau/PowerBI/Adaptive?

Sure. Go for it. In no way do you need to abandon your other tools tomorrow.

Python is a great complement to those other tools, and because both Python and Excel are extremely flexible, it’s very hard to say which is a better fit for your specific problem set. I can say so far in my experience, Python really shines for:

Additionally, at least for me, I find it easier to think about problems when I’m away from the desk with python. The tool turns whatever modeling problem into a simple-ish math problem, instead of a messy excel model that you have to do a lot of F2/Esc flashing to keep track of.

Deciding when to reach for one tool or the other takes practice with both of them and changes as your skills change too. As the world becomes ever more complicated and analysis becomes more sophisticated I think a little Python fluency will pay great dividends to any finance professional’s career. I hope it will be as rewarding for you as it has been for me.