on March 27, 2019
The big debate I always hear is “Why should I learn a programming language such as Python and use it over Excel in the financial world?”
We’ve covered why you should learn Python for Finance in general, however the ensuing debate over excel compelled us to discuss some of the reasons why Python is better than Excel for data analysis.
A little background information about Python: it is an open source programming language with a very large community of supporters and developers which means endless packages designed for all types of industries.
It’s used for general purpose programming and is known for its readability, simplicity, flexibility, modularity and instant feedback. Python is also a glue language meaning that it can integrate with existing software and other programming languages.
The main reasons why you should choose Python over Excel for data analysis is that Python offers:
Data manipulation and data analysis code can be saved as scripts and be reused many times with better version control, and it’s cleaner. You can be sure that your code has executed and the output is correct and consistent. In this sense it’s easier for other users to repeat your code.
Yes, Excel can be used for data science, but at what cost? How long do you have to wait in idle for your spreadsheet to finish for calculations or waiting for the data to be imported in a spreadsheet? Python is faster for I/O, data pipelines, automation, faster at calculating complex equations/algorithms. Python handles big data much more efficient than Excel, at a certain point Excel extremely lags behind Python when handling big data
The most important reason why you should learn Python is deep learning. As the financial world moves into the era of deep learning, researchers and academics are all using Python for deep learning to create predictive and simulations models, finding new insights in their data. Examples of deep learning, using natural language processing to find sentiment analysis from social media websites and how it affects the market, anomaly (fraud) detection, and algorithm based training
Python being a glue language, can integrate with many existing software. Examples are Python can connect to SQL database and use SQL syntax within Python to extract data tables to a Python environment. Python can make interact with Application Program Interfaces (AP)I such as Bloomberg Python API to request the data you need. With Python integrating with these software infrastructure, you can create Python scripts to automate your work ie get data, write function for exploratory data analysis, write functions to visualise the data, save manipulated data to csv or Excel. Learning these techniques you can work more efficiently
One of the cool things about Python is that it’s very approachable for an absolute beginner, so take the initiative and start learning. If you are in Hong Kong, consider Xccelerate’s Intro to Python course for the basics or Python for Finance course if you are looking for more specific applications to your career.