Riskfolio-Lib
Portfolio Optimization in Python, Easy for Everyone.
Description
Riskfolio-Lib is a library for making Portfolio Optimization in Python made in Peru 🇵🇪. Its objective is to help students, academics and practitioners to build investment portfolios based on mathematically complex models with low effort. It is built on top of
CVXPY and closely integrated
with Pandas data structures.
Some of key functionalities that Riskfolio-Lib offers:
-
Mean Risk and Logarithmic Mean Risk (Kelly Criterion) Portfolio Optimization with 4 objective functions:
- Minimum Risk.
- Maximum Return.
- Maximum Utility Function.
- Maximum Risk Adjusted Return Ratio.
-
Mean Risk and Logarithmic Mean Risk (Kelly Criterion) Portfolio Optimization with 26 convex risk measures:
Dispersion Risk Measures:
- Standard Deviation.
- Square Root Kurtosis.
- p-th Root Even Moment of order 2p.
- Mean Absolute Deviation (MAD).
- Gini Mean Difference (GMD).
- Conditional Value at Risk Range.
- Tail Gini Range.
- Entropic Value at Risk Range.
- Relativistic Value at Risk Range.
- Range.
Downside Risk Measures:
- Semi Standard Deviation.
- Square Root Semi Kurtosis.
- p-th Root Even Semi Moment of order 2p.
- First Lower Partial Moment (Omega Ratio).
- Second Lower Partial Moment (Sortino Ratio).
- Conditional Value at Risk (CVaR).
- Tail Gini.
- Entropic Value at Risk (EVaR).
- Relativistic Value at Risk (RLVaR).
- Worst Case Realization (Minimax).
Drawdown Risk Measures:
- Average Drawdown for uncompounded cumulative returns.
- Ulcer Index for uncompounded cumulative returns.
- Conditional Drawdown at Risk (CDaR) for uncompounded cumulative returns.
- Entropic Drawdown at Risk (EDaR) for uncompounded cumulative returns.
- Relativistic Drawdown at Risk (RLDaR) for uncompounded cumulative returns.
- Maximum Drawdown (Calmar Ratio) for uncompounded cumulative returns.
-
Risk Parity Portfolio Optimization with 22 convex risk measures:
Dispersion Risk Measures:
- Standard Deviation.
- Square Root Kurtosis.
- p-th Root Even Moment of order 2p.
- Mean Absolute Deviation (MAD).
- Gini Mean Difference (GMD).
- Conditional Value at Risk Range.
- Tail Gini Range.
- Entropic Value at Risk Range.
- Relativistic Value at Risk Range.
Downside Risk Measures:
- Semi Standard Deviation.
- Square Root Semi Kurtosis.
- p-th Root Even Semi Moment of order 2p.
- First Lower Partial Moment (Omega Ratio)
- Second Lower Partial Moment (Sortino Ratio)
- Conditional Value at Risk (CVaR).
- Tail Gini.
- Entropic Value at Risk (EVaR).
- Relativistic Value at Risk (RLVaR).
Drawdown Risk Measures:
- Ulcer Index for uncompounded cumulative returns.
- Conditional Drawdown at Risk (CDaR) for uncompounded cumulative returns.
- Entropic Drawdown at Risk (EDaR) for uncompounded cumulative returns.
- Relativistic Drawdown at Risk (RLDaR) for uncompounded cumulative returns.
-
Hierarchical Clustering Portfolio Optimization: Hierarchical Risk Parity (HRP) and Hierarchical Equal Risk Contribution (HERC) with 37 risk measures using naive risk parity:
Dispersion Risk Measures:
- Standard Deviation.
- Variance.
- Square Root Kurtosis.
- 2p-th Root of Even Moment of Order 2p.
- Mean Absolute Deviation (MAD).
- Gini Mean Difference (GMD).
- Value at Risk Range.
- Conditional Value at Risk Range.
- Tail Gini Range.
- Entropic Value at Risk Range.
- Relativistic Value at Risk Range.
- Range.
Downside Risk Measures:
- Semi Standard Deviation.
- Fourth Root Semi Kurtosis.
- 2p-th Root Even Semi Moment of order 2p.
- First Lower Partial Moment (Omega Ratio).
- Second Lower Partial Moment (Sortino Ratio).
- Value at Risk (VaR).
- Conditional Value at Risk (CVaR).
- Tail Gini.
- Entropic Value at Risk (EVaR).
- Relativistic Value at Risk (RLVaR).
- Worst Case Realization (Minimax).
Drawdown Risk Measures:
- Average Drawdown for compounded and uncompounded cumulative returns.
- Ulcer Index for compounded and uncompounded cumulative returns.
- Drawdown at Risk (DaR) for compounded and uncompounded cumulative returns.
- Conditional Drawdown at Risk (CDaR) for compounded and uncompounded cumulative returns.
- Entropic Drawdown at Risk (EDaR) for compounded and uncompounded cumulative returns.
- Relativistic Drawdown at Risk (RLDaR) for compounded and uncompounded cumulative returns.
- Maximum Drawdown (Calmar Ratio) for compounded and uncompounded cumulative returns.
-
Nested Clustered Optimization (NCO) with four objective functions and the available risk measures to each objective:
- Minimum Risk.
- Maximum Return.
- Maximum Utility Function.
- Equal Risk Contribution.
This is the beginning of the README. Read the rest at the original. Read the full README ↗