Center a matrix
center(x)
matrix
matrix of centered data
This function is used primarily to center a time series of asset returns or factors. Each column should represent the returns of an asset or factor realizations. The expected value is taken as the sample mean.
x.centered = x - mean(x)