Quantopian's community platform is shutting down. Please read this post for more information and download your code.
Back to Community
minimum variance portfolio w/ S&P 500 sector ETFs and TLT

Looks sorta interesting. Maybe someone would like to improve it or comment? --Grant

5 responses

Since you're already using a general optimization algorithm, why not add the no-shorts as a constraint also? Also, try out bootstrapping, that has helped a lot to reduce the jumpiness of optimized portfolio holdings over time, for me.

Thanks Simon,

The solution is already bounded by:

bnds = ((0,1),(0,1),(0,1),(0,1),(0,1),(0,1),(0,1),(0,1),(0,1),(0,1))  

Do you think it would help to incorporate a no-shorts constraint, as well (x[i] >= 0)?

Also, what do you mean by bootstrapping?

Grant

I try add XIV to the portfolio, it seems approve the little performance and keep same Volatility and Max Drawdown with original portfolio.

Ah no, you shouldn't. I just noticed you were also doing:

allocation[allocation<0]=0  

which would seem to be unnecessary.

I'll have to check. I recall adding it because the bounds are not strictly obeyed. Sometimes there is a small negative value.