mvport

MV Port is a Python package to perform Mean-Variance Analysis. It provides a Portfolio class with a variety of methods to help on your portfolio optimization tasks.


Keywords
mvport
License
MIT
Install
pip install mvport==1.3.1

Documentation

Mean Variance Portfolio

Documentation Status Updates

MV Port is a Python package to perform Mean-Variance Analysis. It provides a Portfolio class with a variety of methods to help on your portfolio optimization tasks.

Features

  • Easy portfolio setup
  • Portfolio evaluation
  • Random portfolio allocation
  • Minimum Variance Portfolio optimization
  • Efficient Frontier evaluation
  • Tangency Portfolio for a given risk free return rate

Installation

To install MV Port, run this command in your terminal:

$ pip install mvport

Check here for further information on installation.

Basic Usage

Instantiate a portfolio and add some stock and evaluate it given a set of weights:

>>> import mvport as mv
>>> p = mv.Portfolio()
>>> p.add_stock('AAPL', [.1,.2,.3])
>>> p.add_stock('AMZN', [.1,.3,.5])
>>> mean, variance, sharp_ratio, weights = p.evaluate([.5, .5])
>>> print '{} +- {}'.format(mean, variance)
0.25 +- 0.0225

Check here for further information on usage.