Using Random Matrix Theory, we build a covariance matrix between stocks of the BM&F-Bovespa (Bolsa de Valores, Mercadorias e Futuros de S\~ao Paulo) which is cleaned of some of the noise due to the complex interactions between the many stocks and the finiteness of available data , and 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 in order to build portfolios of stocks based on Markovitz 's theory, trying to build better predictions of future risk based on past data. This is done for years of both low and high volatility of the Brazilian  market, from 2004 to 2010. 
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.
R
Using
By using
R
a covariance matrix
covariance matrices
R
is
are
R
, and
. We also
R
in order to build portfolios of stocks based on Markovitz
to build stock portfolios based on Markowitz
R
build
obtain
A
stock
A
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.