[{'role': 'system', 'content': "You are an expert in machine learning and your task is to classify code snippets into one of the following categories: ['helper_functions', 'load_data', 'data_exploration', 'data_preprocessing', 'evaluation', 'modelling', 'prediction', 'result_visualization', 'save_results', 'comment_only']."}, {'role': 'user', 'content': "Identify the single most appropriate category to which the provided code belongs. Provide your response as a single category label without any additional information, commentary, or personal opinions.\\nPython Code:def optimal_portfolio(returns):\nn = len(returns)\nreturns = np.asmatrix(returns)\nN = 100\nmus = [10**(5.0 * t/N - 1.0) for t in range(N)]\nS = opt.matrix(np.cov(returns))\npbar = opt.matrix(np.mean(returns, axis=1))\nG = -opt.matrix(np.eye(n))   # negative n x n identity matrix\nh = opt.matrix(0.0, (n ,1))\nA = opt.matrix(1.0, (1, n))\nb = opt.matrix(1.0)\nportfolios = [solvers.qp(mu*S, -pbar, G, h, A, b)['x']\nfor mu in mus]\nreturns = [blas.dot(pbar, x) for x in portfolios]\nrisks = [np.sqrt(blas.dot(x, S*x)) for x in portfolios]\nm1 = np.polyfit(returns, risks, 2)\nx1 = np.sqrt(m1[2] / m1[0])\nwt = solvers.qp(opt.matrix(x1 * S), -pbar, G, h, A, b)['x']\nreturn np.asarray(wt), returns, risks"}, {'role': 'assistant', 'content': 'modelling'}]