def efficient_frontier(self, points):
mu, sigma, weights = [], [], []<EOL>a = np.linspace(<NUM_LIT:0>, <NUM_LIT:1>, points / len(self.w))[:-<NUM_LIT:1>]<EOL>b = list(range(len(self.w) - <NUM_LIT:1>))<EOL>for i in b:<EOL><INDENT>w0, w1 = self.w[i], self.w[i + <NUM_LIT:1>]<EOL>if i == b[-<NUM_LIT:1>]:<EOL><INDENT>a = np.linspace(<NUM_LIT:0>, <NUM_LIT:1>, points / len(self.w))<EOL><DEDENT>for j in a:<EOL><INDENT>w = w1 * j + (<NUM_LIT:1> - j) * w0<EOL>weights.append(np.copy(w))<EOL>mu.append(np.dot(w.T, self.mean)[<NUM_LIT:0>, <NUM_LIT:0>])<EOL>sigma.append(np.dot(np.dot(w.T, self.cov_matrix), w)[<NUM_LIT:0>, <NUM_LIT:0>] ** <NUM_LIT:0.5>)<EOL><DEDENT><DEDENT>return mu, sigma, weights<EOL>
Get the efficient frontier