1. Learn
  2. /
  3. Courses
  4. /
  5. Quantitative Risk Management in Python

Exercise

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.

Instructions 1/3

undefined XP
    1
    2
    3
  • First, initialize an efficient portfolio Python dictionary ec_dict. Then assign, for each epoch key mentioned above, an EfficientCVaR object to ec_dict, using the available returns_dict dictionary of returns matrices.