The codes in this repository can be used to compute risk budgeting portfolios for various risk measures from volatility to expected shortfall. It only requires a sample set of asset returns (historical or simulated) to be used in the stochastic optimization process. Implementation is based on Stochastic Algorithms for Advanced Risk Budgeting by Cetingoz, Fermanian and Guéant.
This repository allows to compute the risk budgeting portfolio for the following risk measures:
- Volatility
- Median Absolute Deviation
- Median Absolute Deviation with expected return
- Expected Shortfall
- Expected Shortfall without expected return
- Power Spectral Measure
- Power Spectral Measure without expected return
- Variantile
pip install git+https://github.com/rengimcetingoz/stochastic_rb.git
from risk_budgeting import RiskBudgeting
# define the problem
rb = RiskBudgeting(risk_measure='expected_shortfall', alpha=0.95, budgets='ERC')
# solve the defined problem for a given array of asset returns X
rb.solve(X)
# get computed weights
rb.x