def min_cov_determinant(prices, frequency=<NUM_LIT>, random_state=None):
if not isinstance(prices, pd.DataFrame):<EOL><INDENT>warnings.warn("<STR_LIT>", RuntimeWarning)<EOL>prices = pd.DataFrame(prices)<EOL><DEDENT>assets = prices.columns<EOL>X = prices.pct_change().dropna(how="<STR_LIT:all>")<EOL>X = np.nan_to_num(X.values)<EOL>raw_cov_array = covariance.fast_mcd(X, random_state=random_state)[<NUM_LIT:1>]<EOL>return pd.DataFrame(raw_cov_array, index=assets, columns=assets) * frequency<EOL>
Calculate the minimum covariance determinant, an estimator of the covariance matrix
that is more robust to noise.

:param prices: adjusted closing prices of the asset, each row is a date
               and each column is a ticker/id.
:type prices: pd.DataFrame
:param frequency: number of time periods in a year, defaults to 252 (the number
                  of trading days in a year)
:type frequency: int, optional
:param random_state: random seed to make results reproducible, defaults to None
:type random_state: int, optional
:return: annualised estimate of covariance matrix
:rtype: pd.DataFrame