Install

https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=GitHub&color=%23fe8e86
Buy Me a Coffee at ko-fi.com

Mac OS X, Windows, and Linux

Riskfolio-lib only supports Python 3.7+ on OS X, Windows, and Linux. I recommend using pip for installation.

  1. It is highly recommendable that you must have installed a scientific Python distribution like anaconda or winpython (Windows only).

  2. Install Pybind11.

pip install pybind11
  1. If you don’t have installed cvxpy, you must follow cvxpy installation instructions before installing Riskfolio-Lib.

  2. If you still have problems installing cvxpy, you can download cvxpy wheel from the Unofficial Windows Binaries for Python Extension Packages and install using pip.

pip install path/cvxpy‑version.whl
  1. Install Visual Studio Build Tools (Only for Windows).

_images/MVSC1.png _images/MVSC2.png
  1. Install Riskfolio-lib.

pip install riskfolio-lib
  1. To run some examples is necessary to install yfinance.

pip install yfinance
  1. To run some examples is necessary to install MOSEK, you must follow MOSEK installation instructions. To get a MOSEK license you must go to Academic Licenses.

pip install mosek

Dependencies

Riskfolio-Lib has the following dependencies:

  • numpy>=1.18.0

  • scipy>=1.1.0

  • pandas>=1.0.0

  • matplotlib>=3.5.0

  • cvxpy>=1.3.1

  • scikit-learn>=1.0.0

  • statsmodels>=0.10.1

  • arch>=4.15

  • xlsxwriter>=1.3.7

  • networkx>=2.5.1

  • astropy>=4.3.1 (if there are problems check astropy installation instructions)

  • pybind11>=2.10.1