CVaR risk management and the crisis
In this exercise you'll derive the 95% CVaR-minimizing portfolio for 2005-2006, 2007-2008, and 2009-2010. These are the periods (or 'epochs') before, during and after the crisis.
To help with this, asset returns in returns_dict
is available as a Python dictionary, with epoch keys 'before'
, 'during'
and 'after'
.
Minimum volatility portfolios are also saved in a dictionary called min_vol_dict
, with the same keys--be sure to check them out in the console.
After deriving each epoch's CVaR-minimizing portfolios, you'll compare them to the min_vol_dict
portfolios. This will show how active risk management against conditional losses changes the portfolio weights.
The EfficientCVaR
class is available.
Cet exercice fait partie du cours
Quantitative Risk Management in Python
Exercice interactif pratique
Essayez cet exercice en complétant cet exemple de code.
# Initialize the efficient portfolio dictionary
ec_dict = ____
# For each epoch, assign an efficient frontier cvar instance to ec
for x in ['before', 'during', ____]:
ec_dict[x] = ____(None, returns_dict[____])