Why Traders and Finance Professionals Need to Learn Python
By: Armen Petrossian
Tags: Finance, Data Science, Python, Jupyter Notebook

How to Excel with Python and Jupyter Notebooks

So what are the solution to those traders and financial professionals who find Excel limiting (if not outdated)?

Learn Python and use Jupyter Notebooks as a container!

Python

Python is reasonably easy to learn and very versatile and hence there is an increased uptake within the financial community. It is now a prerequisite for many quantitative roles, alongside with Excel. It is less elaborate than C++(or Java), meaning that: ❶ the learning curve is not as steep, and also ❷ the amount of code required to complete a task is substantially smaller by a factor of 5x or 10x.

Python’s growing popularity is evident in the vast number of libraries that support pretty much anything you will need as a trader:

reading, writing, cleaning, massaging, slicing/dicing data

maths, stats, and time-series

financial analysis: trading and quantitative finance, market data analysis, stock/derivative market analysis, Bloomberg data access, execution engines, backtesting, risk analytics, etc

machine-learning pipeline (e.g. predicting market prices)

plotting and beautiful/interactive visualizations

SQL support

send emails

web scrapping (e.g. market prices online)

task automation/scheduling

Excel integration (if you really like Excel so much)

❗️ Find a concise summary of libraries here (not affiliated).

Jupyter

Along the same lines, a Jupyter Notebook is a web-based computing environment that enables you to author documents that include: live code, graphs, widgets, rich narrative text (including links, equations, etc), pictures, etc. More specifically, you can:

Edit code in the browser , with automatic syntax highlighting, indentation, and tab-completion/introspection.

, with automatic syntax highlighting, indentation, and tab-completion/introspection. Run code from the browser, with the results of computations attached to the code which generated them.

They provide an all-inclusive, self-contained record of the computation and as such, they can be used in lieu of Excel as a real-time data analysis platform.

The sweet spot

So you might wonder:

👉🏻 Shall I still be using Excel? Of course…

Spreadsheets are still your best bet in the following use cases:

Correctness and accuracy is not a priority

Data is not too big (i.e. no need for scalability)

No need for real-time updates

Using Excel as a scratchpad to quickly put a prototype together

No need for long term maintenance.

What you need is something allowing for rapid development, validation of correctness and extensibility, while keeping the same reactive model as Excel. And this is exactly what the Jupyter Notebooks provide!

No, Excel is not obsolete, but Jupyter Notebooks are better data analysis tools!

Although I have explicitly mentioned some substantial advantages of using the Python/Jupyter combo over Excel or implied the as counterexamples in the “Excel Hell” section, I have collected the top 10 of them here:

✔️ Powerful data manipulation — It is the data scientist’s toolbox after all! ✔️Advanced visualization capabilities — No more boring charts!

✔️ Better user experience

✔️ Big dataset processing — No more crashing!

✔️ Performance management — Making advantage of multiprocessing

✔️ Test-Driven Development — Think quality!

✔️ Open source accessibility — “There is a lib for it!”

✔️ Error traceability

✔️ Easier automation

✔️ Self-documenting — Don’t underestimate the value of this!