scikit-portfolio

Welcome to scikit-portfolio

Scikit-portfolio is a Python package designed to introduce data scientists and machine learning engineers to the problem of optimal portfolio allocation in finance. The main idea of scikit-portfolio is to provide many well-known portfolio optimization methods with an easily accessible scikit-learn inspired set of API.

This approach makes it possible to incorporate portfolio estimators as if they are classical scikit-learn estimators, thus enabling cross-validation and hyperparameters optimization with the tools of the Python data-science toolkit, and with an eye the highly technical domain of investment portfolio management.

This library is based upon the following open-source tools:

  • PyPortfolioOpt
  • cvxpy: a tool for convex optimization that makes it very easy to write optimization problem, with complex objective functions and constraints.
  • numpy: numerical analysis and linear algebra in Python
  • pandas: manipulation of structured data tables in Python.

Getting started

If you already have some background of portfolio optimization, and just want to jump start into the usage of the library, read here💻️✍️.

Otherwise if you are relatively new to financial portfolio optimization, read this introduction 👨‍🎓️, where we provide the reader a coincise overview over the main ideas and methods in portfolio optimization.