...
Project description
Cvxportfolio
Cvxportfolio is currently under development. We will freeze the user interface by end of 2023Q2 and release the first stable version by end of 2023Q3.
cvxportfolio
is a python library for portfolio optimization and simulation,
based on the paper Multi-Period Trading via Convex Optimization.
It is written in Python, its major dependencies are cvxpy
and pandas
.
The documentation of the package is at cvxportfolio.readthedocs.io.
Installation
pip install cvxportfolio
Testing
To test it locally set up the development environment with poetry
(you will need to
install it first) and run pytest
.
git clone https://github.com/cvxgrp/cvxportfolio.git
cd cvxportfolio
poetry install
poetry run pytest --cov
Examples
You can see basic usage of the package in the example notebooks. Currently we are working on simplifying the user interface and these may change.
To run them clone the repository, create the environment and the cvxportfolio
kernel, and then start jupyter
.
git clone https://github.com/cvxgrp/cvxportfolio.git
cd cvxportfolio
poetry install
bash create_kernel.sh
cd examples
poetry run jupyter notebook
The ones that run without isses (as of 2023-04-11) are HelloWorld and MultiPeriodTCostOptimization.
The other example notebooks were used to develop the plots and results in the paper. We are keeping them for historical record but they don't currently run. We are doing our best to restore them.
Citing
If you wish to cite CVXPortfolio, please use:
@article{BBDKKNS:17,
author = {S. Boyd and E. Busseti and S. Diamond and R. Kahn and K. Koh and P. Nystrup and J. Speth},
title = {Multi-Period Trading via Convex Optimization},
journal = {Foundations and Trends in Optimization},
year = {2017},
month = {August},
volume = {3},
number = {1},
pages = {1--76},
publisher = {Now Publishers},
url = {http://stanford.edu/~boyd/papers/cvx_portfolio.html},
}
License
Cvxportfolio is licensed under the Apache 2.0 permissive open source license.
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
Hashes for cvxportfolio-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 90fd0a6a3f9818e2b2e75bf27b3875c4ff4bd7a8f19903bcf2941d1f66ecb270 |
|
MD5 | 26646106c2420b912dff1f9690d18ad1 |
|
BLAKE2b-256 | 9ae50280d58769df9d7a923153e7c7e9cafa8a961cb5b9a4a13a77fe1de598d5 |