Python package for asset allocation with a primary focus on integrating investor views.
Project description
Py-vAllocation
Py-vAllocation is a Python package for asset allocation with a primary focus on integrating investor views.
Features
It's yet another portfolio optimization library, but unlike many others, Py-vAllocation aims to:
- Be modular and beginner-friendly with a simple API, while remaining flexible and customizable for advanced users
- Avoid hidden assumptions or black-box components, every modeling choice is explicitly stated
- Incorporate investor views via fully flexible probabilities using entropy pooling and the Black-Litterman methodology
- Support shrinkage and other Bayesian estimation methods
- Support variance-based, scenario-based CVaR, and robust optimization models
- Combine portfolios using ensemble averaging and exposure stacking to build diversified allocations across models
Installation
You can install Py-vAllocation from PyPI using:
pip install py-vallocation
Quick Start
See examples here
Requirements
- Python 3.8+
- numpy >= 1.20.0
- cvxopt >= 1.2.0
- pandas >=1.0.0
- scipy >= 1.10.0
Development Status
Alpha release: Under active development. Many features are not yet implemented or fully tested. Breaking changes may occur without notice. Use at your own risk.
Underlying literature
- Meucci, A. (2008). Fully Flexible Views: Theory and Practice. https://ssrn.com/abstract=1213325
- Black, F., & Litterman, R. (1992). Global Portfolio Optimization. https://doi.org/10.2469/faj.v48.n5.28
- Ledoit, O., & Wolf, M. (2004). A well-conditioned estimator for large-dimensional covariance matrices. https://doi.org/10.1016/S0047-259X(03)00096-4
- Jorion, P. (1986). Bayes-Stein Estimation for Portfolio Analysis. https://doi.org/10.2307/2331042
- Rockafellar, R. T., & Uryasev, S. (2000). Optimization of Conditional Value-at-Risk. 10.21314/JOR.2000.038
- Markowitz, H. (1952). Portfolio Selection. https://doi.org/10.2307/2975974
- Idzorek, T. (2005). A Step-by-Step Guide to the Black-Litterman Model. https://people.duke.edu/~charvey/Teaching/BA453_2006/Idzorek_onBL.pdf
- Meucci, A. (2005). Robust Bayesian Allocation, https://dx.doi.org/10.2139/ssrn.681553
- Vorobets, A. (2021). Sequential Entropy Pooling Heuristics, http://dx.doi.org/10.2139/ssrn.3936392
Contributing
Contributions and feedback are welcome! Please see CONTRIBUTING.md for guidelines.
License
This project is licensed under the GNU General Public License v3.0 License. See LICENSE for details.
Credits
Some code, where explicitly stated, is adapted from fortitudo-tech
Star History
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file py_vallocation-0.2.0.tar.gz.
File metadata
- Download URL: py_vallocation-0.2.0.tar.gz
- Upload date:
- Size: 67.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a9ad7d1716238cee575dfe08afb46816cf31bc43aa9f562fc44c0727e0aed848
|
|
| MD5 |
56ad060de5dd83153795501a84ff5252
|
|
| BLAKE2b-256 |
bf479ed32e39632755fee088c29a15f632481552d4a414fbb134c9413afac0d7
|
File details
Details for the file py_vallocation-0.2.0-py3-none-any.whl.
File metadata
- Download URL: py_vallocation-0.2.0-py3-none-any.whl
- Upload date:
- Size: 71.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
555a47696e3a41081975a76d56d081f1f6269d9334de5e82077871ec4f786f91
|
|
| MD5 |
8017868807206d5c89593f52041e001f
|
|
| BLAKE2b-256 |
747e243aec88e1041ed4f3e184c14627f25d32e04625cf4a5274e34f94203254
|