Many portfolios are managed to a benchmark, typically an index. Some portfolios are expected to replicate, before trading and other costs, the returns of an index exactly (e.g., an index fund), while others are expected to 'actively manage' the portfolio by deviating slightly from the index in order to generate active returns. Tracking error is a measure of the deviation from the benchmark; the aforementioned index fund would have a tracking error close to zero, while an actively managed portfolio would normally have a higher tracking error. Thus the tracking error does not include any risk (return) that is merely a function of the market's movement. In addition to risk (return) from specific stock selection or industry and factor "betas", it can also include risk (return) from market timing decisions.