I'm currently using the PyPortfolioOpt with the CLA model to draw the efficient frontier. However, I wanted to get the weights, variance and expected return for the minimum variance and maximum sharpe portfolios.
The ideia is to bootstrap different optimized portfolios, in order to get the average optimized portfolio. It would be something similar to Michaud's resampling solution here, without recreating the whole frontier, but only getting the bootstrapped min_var and max_sharpe portfolios.
My current code is the following:
paths = [data_raw.pct_change().sample(100,replace=True).to_numpy() for x in range(100)]
sharpe_list = []
min_var_list = []
for path in paths:
mu = path.mean(axis=0) * 252
S = pd.DataFrame(path).cov()*np.sqrt(252)
test = CLA(mu,S)
min_var = test.min_volatility()
test = CLA(mu,S)
max_sharpe = test.max_sharpe()
sharpe_list.append(list(min_var.values()))
min_var_list.append(list(max_sharpe.values()))
Hi!
I'm currently using the PyPortfolioOpt with the CLA model to draw the efficient frontier. However, I wanted to get the weights, variance and expected return for the minimum variance and maximum sharpe portfolios.
The ideia is to bootstrap different optimized portfolios, in order to get the average optimized portfolio. It would be something similar to Michaud's resampling solution here, without recreating the whole frontier, but only getting the bootstrapped min_var and max_sharpe portfolios.
My current code is the following:
Is it possible to achieve that?
Thanks in advance.