  By using Random Matrix Theory, we build covariance matrices between stocks of
the BM&F-Bovespa (Bolsa de Valores, Mercadorias e Futuros de S\~ao Paulo) which
are cleaned of some of the noise due to the complex interactions between the
many stocks and the finiteness of available data. We also use a regression
model in order to remove the market effect due to the common movement of all
stocks. These two procedures are then used to build stock portfolios based on
Markowitz's theory, trying to obtain better predictions of future risk based on
past data. This is done for years of both low and high volatility of the
Brazilian stock market, from 2004 to 2010. The results show that the use of
regression to subtract the market effect on returns greatly increases the
accuracy of the prediction of risk, and that, although the cleaning of the
correlation matrix often leads to portfolios that better predict risks, in
periods of high volatility of the market this procedure may fail to do so.
