Book Image

Python for Finance

By : Yuxing Yan
Book Image

Python for Finance

By: Yuxing Yan

Overview of this book

A hands-on guide with easy-to-follow examples to help you learn about option theory, quantitative finance, financial modeling, and time series using Python. Python for Finance is perfect for graduate students, practitioners, and application developers who wish to learn how to utilize Python to handle their financial needs. Basic knowledge of Python will be helpful but knowledge of programming is necessary.
Table of Contents (14 chapters)
13
Index

Installing matplotlib via ActivePython


The first way to install the matplotlib module is via ActivePython. We install ActivePython first and then install matplotlib. In the process of installing matplotlib, NumPy would be installed as well since matplotlib depends on both NumPy and SciPy. The whole procedure has four steps as follows:

  1. Go to http://www.activestate.com/activepython/downloads.

  2. Choose an appropriate executable file to download.

  3. For Windows, navigate to All Programs | Accessories, and then click on Command Prompt. You will see the following window:

  4. After going to the appropriate directory, such as C:\Python27, type pypm install matplotlib as shown in the following screenshot:

The matplotlib module depends on both NumPy and SciPy. Since the NumPy module will be installed automatically when we install matplotlib, we need to install SciPy; see the following similar procedure:

To launch Python, navigate to All Programs | ActivateStateActive Python, and then click on IDLE (Python GUI)...