PyNance¶
Release: | 0.5.1 |
---|---|
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.
Installation¶
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
Basics¶
Stock quotes maintained by Yahoo! Finance can be retrieved with the simple command:
>>> import pynance as pn
>>> ge = pn.data.get('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 pynance.data
have been designed
for easy creation of features and labels for machine learning applications. You can
pass metrics from pynance.tech
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 pynance.data
.
Issues¶
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.
Reference¶
- Charts (
pynance.chart
) - Common - generic functions (
pynance.common
) - Data (
pynance.data
) - Data - combine features and labels (
pynance.data.combine
) - Data - compare (
pynance.data.compare
) - Data - building features (
pynance.data.feat
) - Data - building labels (
pynance.data.lab
) - Data - preprocessing functions (
pynance.data.prep
) - Data - remote retrieval (
pynance.data.retrieve
) - Dateutils (
pynance.dateutils
) - Interest rates (
pynance.interest
) - Machine learning (
pynance.learn
) - Linear regression (
pynance.learn.linreg
) - Metrics (
pynance.learn.metrics
) - Options (
pynance.opt
) - Options - options class (
pynance.opt.core
) - Options - covered calls (
pynance.opt.covcall
) - Options - price (
pynance.opt.price
) - Options - remote retrieval (
pynance.opt.retrieve
) - Options spreads (
pynance.opt.spread
) - Options - spreads (
pynance.opt.spread.core
) - Options - diagonal spreads (
pynance.opt.spread.diag
) - Options - vertical spreads (
pynance.opt.spread.vert
) - Portfolio optimization (
pynance.pf
) - Technical analysis (
pynance.tech
) - Technical analysis - moving averages (
pynance.tech.movave
) - Technical analysis - basic metrics (
pynance.tech.simple
)