=======================
Mean Variance Portfolio
=======================
.. image:: https://img.shields.io/pypi/v/mvport.svg
:target: https://pypi.python.org/pypi/mvport
.. image:: https://github.com/condereis/mean-variance-portfolio/actions/workflows/python-app.yml/badge.svg
:target: https://github.com/condereis/mean-variance-portfolio/actions/workflows/python-app.yml
.. image:: https://readthedocs.org/projects/mean-variance-portfolio/badge/?version=latest
:target: https://mean-variance-portfolio.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status
.. image:: https://pyup.io/repos/github/condereis/mean-variance-portfolio/shield.svg
:target: https://pyup.io/repos/github/condereis/mean-variance-portfolio/
:alt: 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.
* Free software: MIT license
* Documentation: https://mean-variance-portfolio.readthedocs.io.
.. Modern portfolio theory (MPT), or mean-variance analysis, is a mathematical framework for assembling a portfolio of assets such that the expected return is maximized for a given level of risk. It is a formalization and extension of diversification in investing, the idea that owning different kinds of financial assets is less risky than owning only one type. Its key insight is that an asset's risk and return should not be assessed by itself, but by how it contributes to a portfolio's overall risk and return. It uses the variance of asset prices as a proxy for risk.
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:
.. code:: bash
$ pip install mvport
Check `here <https://mean-variance-portfolio.readthedocs.io/en/latest/installation.html>`_ for further information on installation.
Basic Usage
-----------
Instantiate a portfolio and add some stock and evaluate it given a set of weights:
.. code:: python
>>> 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 <https://mean-variance-portfolio.readthedocs.io/latest/usage.html>`_ for further information on usage.
Raw data
{
"_id": null,
"home_page": "https://github.com/condereis/mean-variance-portfolio",
"name": "mvport",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "mvport",
"author": "Rafael Lopes Conde dos Reis",
"author_email": "rafael.lcreis@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/ab/c7/fd3f86f0232f5f283928726ed9ded70cdca09803217262322ee7bb311bf2/mvport-1.3.2.tar.gz",
"platform": null,
"description": "=======================\nMean Variance Portfolio\n=======================\n\n\n.. image:: https://img.shields.io/pypi/v/mvport.svg\n :target: https://pypi.python.org/pypi/mvport\n\n.. image:: https://github.com/condereis/mean-variance-portfolio/actions/workflows/python-app.yml/badge.svg\n :target: https://github.com/condereis/mean-variance-portfolio/actions/workflows/python-app.yml\n\n.. image:: https://readthedocs.org/projects/mean-variance-portfolio/badge/?version=latest\n :target: https://mean-variance-portfolio.readthedocs.io/en/latest/?badge=latest\n :alt: Documentation Status\n\n.. image:: https://pyup.io/repos/github/condereis/mean-variance-portfolio/shield.svg\n :target: https://pyup.io/repos/github/condereis/mean-variance-portfolio/\n :alt: Updates\n\n\n\nMV 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.\n\n\n* Free software: MIT license\n* Documentation: https://mean-variance-portfolio.readthedocs.io.\n\n.. Modern portfolio theory (MPT), or mean-variance analysis, is a mathematical framework for assembling a portfolio of assets such that the expected return is maximized for a given level of risk. It is a formalization and extension of diversification in investing, the idea that owning different kinds of financial assets is less risky than owning only one type. Its key insight is that an asset's risk and return should not be assessed by itself, but by how it contributes to a portfolio's overall risk and return. It uses the variance of asset prices as a proxy for risk.\n\nFeatures\n--------\n\n* Easy portfolio setup\n* Portfolio evaluation\n* Random portfolio allocation\n* Minimum Variance Portfolio optimization\n* Efficient Frontier evaluation\n* Tangency Portfolio for a given risk free return rate\n\n\nInstallation\n------------\nTo install MV Port, run this command in your terminal:\n\n.. code:: bash\n\n $ pip install mvport\n\nCheck `here <https://mean-variance-portfolio.readthedocs.io/en/latest/installation.html>`_ for further information on installation.\n\nBasic Usage\n-----------\n\nInstantiate a portfolio and add some stock and evaluate it given a set of weights:\n\n.. code:: python\n\n >>> import mvport as mv\n >>> p = mv.Portfolio()\n >>> p.add_stock('AAPL', [.1,.2,.3])\n >>> p.add_stock('AMZN', [.1,.3,.5])\n >>> mean, variance, sharp_ratio, weights = p.evaluate([.5, .5])\n >>> print '{} +- {}'.format(mean, variance)\n 0.25 +- 0.0225\n\nCheck `here <https://mean-variance-portfolio.readthedocs.io/latest/usage.html>`_ for further information on usage.\n",
"bugtrack_url": null,
"license": "MIT license",
"summary": "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.",
"version": "1.3.2",
"project_urls": {
"Homepage": "https://github.com/condereis/mean-variance-portfolio"
},
"split_keywords": [
"mvport"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "3a93e17769db38f0466fb3649a4f16fdb4f17a04e71ec3bcfee02fce15aa5bb0",
"md5": "c4de6d138c0e92473ec3081d6a573303",
"sha256": "3dadaaf7721d6f593f694c5f400fd6db4e24a39f7122499fabdad26141fa8483"
},
"downloads": -1,
"filename": "mvport-1.3.2-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "c4de6d138c0e92473ec3081d6a573303",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": null,
"size": 7706,
"upload_time": "2024-07-02T05:05:39",
"upload_time_iso_8601": "2024-07-02T05:05:39.803998Z",
"url": "https://files.pythonhosted.org/packages/3a/93/e17769db38f0466fb3649a4f16fdb4f17a04e71ec3bcfee02fce15aa5bb0/mvport-1.3.2-py2.py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "abc7fd3f86f0232f5f283928726ed9ded70cdca09803217262322ee7bb311bf2",
"md5": "6b76da05d79cb1f17af3cbaf72c2157d",
"sha256": "862cfcdc5dcfa415ffd71cf15e4dba0ac39eb969afd17ee6c0bd69284d2501d1"
},
"downloads": -1,
"filename": "mvport-1.3.2.tar.gz",
"has_sig": false,
"md5_digest": "6b76da05d79cb1f17af3cbaf72c2157d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 14798,
"upload_time": "2024-07-02T05:05:42",
"upload_time_iso_8601": "2024-07-02T05:05:42.274888Z",
"url": "https://files.pythonhosted.org/packages/ab/c7/fd3f86f0232f5f283928726ed9ded70cdca09803217262322ee7bb311bf2/mvport-1.3.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-07-02 05:05:42",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "condereis",
"github_project": "mean-variance-portfolio",
"travis_ci": true,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "numpy",
"specs": [
[
"==",
"2.0.0"
]
]
},
{
"name": "scipy",
"specs": [
[
"==",
"1.14.0"
]
]
}
],
"tox": true,
"lcname": "mvport"
}