# Compare portfolio variance using different regularizers

I'm given a question like below. Using the 48_Industry_Portfolios_daily dataset: characterize/describe the dataset and focus on the global minimum variance portfolio. Compare the portfolio variance using different regularizers and use validation methods to find the optimal parameters.

What I'm not clear is to compare the portfolio variance with different regularizers and to use validation methods.

I was using Python to find the efficient frontier. What I need to know is, are there any useful python materials where I can compare portfolio variance using different regularizes. I was not able to find useful resources

• Hi please find the attached link. This explains how I used it. I have shown only 9 parameters. But there are 48 – Hiru Feb 28 '19 at 7:22

When you solve for a minimum variance portfolio you acquire some values, $$\mathbf{\beta}$$ corresponding to the weights of your assets, usually such that $$\sum \mathbf{\beta} = 1$$.

Regularization means you try to limit these values such that your objective function also includes the norm of $$\mathbf{\beta}$$ (Ridge regression - L2-norm) or the sum of absolute values of $$\mathbf{\beta}$$ (Lasso - L1-norm). If you allow short selling this means you will try to avoid the case where one asset might have a weight of -1000 and another +1000.

If you don't allow short selling the assets already contain some sort of regularisation but you might further control it by comparing it to the case, for example, where each asset is weighted equally, to avoid many assets having zero weight.

Usually you will control the amount of regularisation with a hyper parameter assigning how much weight to the ridge (or lasso) component you want to prioritise. If you review the documentation for Python's SKlearn Library you will find a lot of documentation about regularisation, as well as cross-validation which is what you will need to test your choices

• Thanks you... quant.stackexchange.com/questions/44210/… . In my code the 'portfolio_annualised_performance' method computes the standard deviation as std. Is it where I should add the regularizer parameter to the code? I'm actually confused when adding the regularized parameter to the code. – Hiru Mar 3 '19 at 19:00