Installing and setting up the required Python modules
While there are some parts of our code that we can write using purely primitive Python functions, our work will be made much easier by using Python modules. A module is a piece of code written and published by someone else, that you can use for free. That’s the beauty of modern open source software – there are very few limits to productivity and creativity. Modules allow us to build on the shoulders of giants, as it were.
Another benefit of Colab is that it always runs a fresh version of Python and many popular modules, so there is less hassle in downloading, installing, and upgrading these different versions. Trust me, it can become quite a hassle over time when you start getting conflicts between different modules.
We will be making use of several popular modules, including NumPy, SciPy, pandas, and matplotlib, in addition to some more specific to finance that we will install when needed. By way of example...