Skip to main content

...

Project description

Cvxportfolio

CVXportfolio on PyPI Downloads Apache 2.0 License Code style: black Documentation Status Binder

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cvxportfolio-0.1.1.tar.gz (19.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cvxportfolio-0.1.1-py3-none-any.whl (26.8 kB view details)

Uploaded Python 3

File details

Details for the file cvxportfolio-0.1.1.tar.gz.

File metadata

  • Download URL: cvxportfolio-0.1.1.tar.gz
  • Upload date:
  • Size: 19.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for cvxportfolio-0.1.1.tar.gz
Algorithm Hash digest
SHA256 be2a4c03099993d97549381ea45b5abdafed3ad46097de2cc98d1ac8e26b5cfc
MD5 d1191da24738648ca59ec17975170532
BLAKE2b-256 4e3042bafb4c3279aad904b91527b4d474292a491fcbf3a5c3f92444ef77ffca

See more details on using hashes here.

File details

Details for the file cvxportfolio-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: cvxportfolio-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 26.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for cvxportfolio-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 90fd0a6a3f9818e2b2e75bf27b3875c4ff4bd7a8f19903bcf2941d1f66ecb270
MD5 26646106c2420b912dff1f9690d18ad1
BLAKE2b-256 9ae50280d58769df9d7a923153e7c7e9cafa8a961cb5b9a4a13a77fe1de598d5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page