MATLAB: Estimator standard errors using fmincon (portfolio optimization context)

fminconportfolio optimizationsignificancestandard errors

I'm trying to get standard errors of the estimators in my optimization. I use the fmincon function with the active-set algorithm and dfp updating scheme. I am working on a portfolio optimization problem and what I would like to do is determine the statistical significance of the estimators in determining model performance (so which variables actually matter in determining model outperformance relative to the benchmark).
I have already ran a CAPM regression using Newey-West robust standard errors, however this just gives you a value for market beta and an alpha. I did this by taking my model returns as the dependent variable and taking the a vector of ones and the market returns as the independent variables.
Would it be correct to run a regression incorporating the other variables I believe to be useful (again with model returns as dependent variable), or do I need to do something else? I am wondering about this, since when I search for standard errors of the estimators on Google/the Matlab website, I just find a lot about calculating the Hessian.
Thanks in advance.
Martin Pott

Best Answer

The key to the standard errors is the Hessian matrix. The variance-covariance-matrix of the coefficients is the inverse of the Hessian matrix. So the standard errors are the square root of the values on the diagonal of the inverse Hessian matrix.
err = sqrt(diag(inv(Hessian)))
The Hessian matrix is the 7th output variable of the fmincon function.