Date:April 04, 2016

PyNance is open-source software for retrieving, analysing and visualizing data from stock and derivatives markets. It includes tools for generating features and labels for machine learning algorithms.


PyNance depends on several powerful libraries that can be tricky to install, specifically NumPy, Pandas, and matplotlib. Unless you have already installed these libraries, it is recommended to install the following individually using pip, as you will likely need to debug one or more of these installations:

pip install matplotlib
pip install numpy
pip install pandas
pip install pandas-datareader
pip install pynance

Or for Python 3.x.x use pip3 instead of pip.

If you already have at least NumPy, Pandas and matplotlib installed or just prefer installing in one big step:

pip install pynance


Stock quotes maintained by Yahoo! Finance can be retrieved with the simple command:

>>> import pynance as pn
>>> ge ='ge', '1962', '2015')

Current options quotes can be retrieved using:

>>> geopt, geexp = pn.opt.get('ge').info()

The options data retrieved can then be analysed using functions from pynance.opt.

Many of the functions in the submodules of have been designed for easy creation of features and labels for machine learning applications. You can pass metrics from along with numeric parameters to create highly customizable data sets to which machine learning algorithms can then be applied. Examples can be found in the documentation for


Please help us by reporting any problems you find and sharing your ideas for new features.

If you find a bug or think of a feature you would like to see included in the next release, please report the issue on GitHub in accordance with the Scipy guidelines.

Prior Versions